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 | ||
---|---|---|
method | getCount() | |
Gets the number of elements actually contained in the collection.
|
||
method | getMasterShortcuts() | |
MasterShortcut collection.
|
||
method | get(index) | |
Gets the element at the specified index.
|
Method Summary | ||
---|---|---|
method | add(master) | |
Add the Master object in the collection.
|
||
method | clear() | |
Removes all elements from collection.
|
||
method | getMaster(ID) | |
Gets the element at the specified ID.
|
||
method | getMasterByName(name) | |
Get master by name.
|
||
method | getMaxRelID() | |
get the max rel id in the collection.
|
||
method | isExist(index) | |
Is exist item in the collection.
|
||
method | isExist(name) | |
Is exist master in the collection.
|
||
method | isExistRelId(relID) | |
Is exist master rel id in the collection.
|
||
method | iterator() | |
Supports a simple iteration over a nongeneric collection.
|
||
method | remove(master) | |
Remove the Master object from the collection.
|
MasterShortcutCollection getMasterShortcuts()
int getCount()
int add(master)
master: Master
- remove(master)
master: Master
- Master getMaster(ID)
ID: int
- 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());
Master getMasterByName(name)
name: String
- 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());
int getMaxRelID()
name
- boolean isExistRelId(relID)
name
- boolean isExist(name)
name: String
- 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()
boolean isExist(index)
index: int
- index of element.clear()