asposediagram.api

Class MasterCollection

Master collection.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");

diagram = new aspose.diagram.Diagram("RetrieveMasterInfo.vdx");

masters = diagram.getMasters();
for (var it = masters.iterator(); it.hasNext();) {
    master = it.next();
    // Display information about the masters
    console.log("\nMaster ID : " + master.getID());
    console.log("Master Name : " + master.getName());
}

Property Getters/Setters Summary
methodgetCount()
Gets the number of elements actually contained in the collection.
methodgetMasterShortcuts()
MasterShortcut collection.
methodget(index)
Gets the element at the specified index.
 
Method Summary
methodadd(master)
Add the Master object in the collection.
methodclear()
Removes all elements from collection.
methodgetMaster(ID)
Gets the element at the specified ID.
methodgetMasterByName(name)
Get master by name.
methodgetMaxRelID()
get the max rel id in the collection.
methodisExist(index)
Is exist item in the collection.
methodisExist(name)
Is exist master in the collection.
methodisExistRelId(relID)
Is exist master rel id in the collection.
methoditerator()
Supports a simple iteration over a nongeneric collection.
methodremove(master)
Remove the Master object from the collection.
 

    • Property Getters/Setters Detail

      • getCount : int 

        int getCount()
        
        Gets the number of elements actually contained in the collection.
      • get : Master 

        Master get(index)
        
        Gets the element at the specified index.
        Parameters:
        index -
        Returns:
    • Method Detail

      • add

        int add(master)
        Add the Master object in the collection.
        Parameters:
        master: Master -
        Returns:
      • remove

         remove(master)
        Remove the Master object from the collection.
        Parameters:
        master: Master -
      • getMaster

        Master getMaster(ID)
        Gets the element at the specified ID.
        Parameters:
        ID: int -
        Returns:

        Example:

        var aspose = aspose || {};
        aspose.diagram = require("aspose.diagram");
        
        diagram = new aspose.diagram.Diagram("RetrieveMasterInfo.vdx");
        
        // Get master object by id
        master = diagram.getMasters().getMaster(2);
        console.log("Master ID : " + master.getID());
        console.log("Master Name : " + master.getName());
        console.log("Master Name : " + master.getUniqueID());
      • getMasterByName

        Master getMasterByName(name)
        Get master by name.
        Parameters:
        name: String -
        Returns:

        Example:

        var aspose = aspose || {};
        aspose.diagram = require("aspose.diagram");
        
        diagram = new aspose.diagram.Diagram("BasicShapes.vss");
        
        // Get master object by name
        master = diagram.getMasters().getMasterByName("Circle");
        console.log("Master ID : " + master.getID());
        console.log("Master Name : " + master.getName());
        console.log("Master Name : " + master.getUniqueID());
      • getMaxRelID

        int getMaxRelID()
        get the max rel id in the collection.
        Parameters:
        name -
        Returns:
      • isExistRelId

        boolean isExistRelId(relID)
        Is exist master rel id in the collection.
        Parameters:
        name -
        Returns:
      • isExist

        boolean isExist(name)
        Is exist master in the collection.
        Parameters:
        name: String -
        Returns:

        Example:

        var aspose = aspose || {};
        aspose.diagram = require("aspose.diagram");
        
        diagram = new aspose.diagram.Diagram("BasicShapes.vss");
        
        // check master object by name
        isPresent = diagram.getMasters().isExist("60 degree single");
        
        console.log("Master Presence : " + isPresent);
      • iterator

        Iterator iterator()
        Supports a simple iteration over a nongeneric collection.
        Returns:
      • isExist

        boolean isExist(index)
        Is exist item in the collection.
        Parameters:
        index: int - index of element.
        Returns:
      • clear

         clear()
        Removes all elements from collection.