aspose.diagram
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
functiongetCount()
           Gets the number of elements actually contained in the collection.
functiongetMasterShortcuts()
           MasterShortcut collection.
functionget(index)
           Gets the element at the specified index.
 
Method Summary
functionadd(master)
           Add the Master object in the collection.
functionclear()→ inherited from Collection
           Removes all elements from collection.
functiongetMaster(ID)
           Gets the element at the specified ID.
functiongetMasterByName(name)
           Get master by name.
functiongetMaxRelID()
           get the max rel id in the collection.
functionisExist(index)→ inherited from Collection
           Is exist item in the collection.
functionisExist(name)
           Is exist master in the collection.
functionisExistRelId(relID)
           Is exist master rel id in the collection.
functioniterator()→ inherited from Collection
           Supports a simple iteration over a nongeneric collection.
functionremove(master)
           Remove the Master object from the collection.
 

Property Getters/Setters Detail

getMasterShortcuts : MasterShortcutCollection 

function getMasterShortcuts()
MasterShortcut collection.

getCount : Number 

function getCount()
Gets the number of elements actually contained in the collection.

get : Master 

function get(index)
Gets the element at the specified index.
Parameters:
index -
Returns:

Method Detail

add

function add(master)
Add the Master object in the collection.
Parameters:
master: Master -
Returns:

remove

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

getMaster

function getMaster(ID)
Gets the element at the specified ID.
Parameters:
ID: Number -
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

function 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

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

isExistRelId

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

isExist

function 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

function iterator()
Supports a simple iteration over a nongeneric collection.
Returns:

isExist

function isExist(index)
Is exist item in the collection.
Parameters:
index: Number - index of element.
Returns:

clear

function clear()
Removes all elements from collection.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.