Diagram
Inheritance: java.lang.Object
public class Diagram
Root element of Visio objects hierarchy.
Constructors
Constructor | Description |
---|---|
Diagram() | |
Diagram(String filename) | Public class constructor, loads the diagram from the file. |
Diagram(InputStream stream) | Public class constructor, loads the diagram from the stream. |
Diagram(InputStream stream, int format) | Public class constructor, loads the diagram from the stream using predefined format. |
Diagram(InputStream stream, LoadOptions options) | Public class constructor, loads the diagram from the stream using predefined load file options. |
Diagram(String filename, int format) | Public class constructor, loads the diagram from the file using predefined format. |
Diagram(String filename, LoadOptions options) | Public class constructor, loads the diagram from the file using predefined load file options. |
Methods
Method | Description |
---|---|
addMaster(Diagram srcDiagram, String masterName) | Adds master to diagram from source diagram by master’s Name or NameU. |
addMaster(InputStream templateStream, int masterID) | Adds master to diagram from template stream by master’s ID. |
addMaster(InputStream templateStream, String masterName) | Adds master to diagram from template stream by master’s Name or NameU. |
addMaster(String templateFilePath, int masterID) | Adds master to diagram from template file by master’s ID. |
addMaster(String templateFilePath, String masterName) | Adds master to diagram from template file by master’s Name or NameU. |
addShape(Shape newShape, String masterName, int pageNumber) | Adds shape created by master to specific page. |
addShape(double pinX, double pinY, double width, double height, String masterName, int pageNumber) | Adds shape created by master on page with defined PinX,PinY,Width and Height. |
addShape(double pinX, double pinY, String masterName, int pageNumber) | Adds shape created by master on page with defined PinX and PinY. |
combine(Diagram secondDiagram) | Combines another Diagram object. |
copyTheme(Diagram source) | Copies Theme from a source Diagram. |
dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
equals(Object arg0) | |
export(InputStream inputVsd, InputStream outputVdw) | Exports the diagram from vsd stream to vdw stream format. |
export(InputStream inputVsd, String outputVdw) | Exports the diagram from vsd stream to *.vdw file format. |
export(String inputVsd, InputStream outputVdw) | Exports the diagram from vsd file to vdw stream format. |
export(String inputVsd, String outputVdw) | Exports the diagram from vsd to vdw format. |
getActivePage() | Specifies the active page |
getBuildnum() | The build number of the Visio instance used to create the document. |
getClass() | |
getColors() | Contains the document’s color table. |
getDataConnections() | Contains the DataConnection elements for the document. |
getDataRecordSets() | The collection of DataRecordset objects associated with a Document object. |
getDefaultFontDir() | Get the Default Fonts folder path |
getDocLangID() | The unique ID of the user-interface language the user has specified in Microsoft Office 2010 Language Preferences. |
getDocumentProps() | Contains document property elements such as the document’s title, author, and so on. |
getDocumentSettings() | Contains elements that specify document settings. |
getDocumentSheet() | Specifies a document’s ShapeSheet structure. |
getEmailRoutingData() | Contains a MIME (Multipurpose Internet Mail Extensions) encoded MAPI e-mail routing slip for the document. |
getEventItems() | Contains an EventItem element for each event to which an object should respond. |
getFonts() | Contains a collection of Font elements |
getHeaderFooter() | Contains elements for a document’s header and footer. |
getInterruptMonitor() | the interrupt monitor. |
getKey() | Indicates whether the document has been modified outside of Visio. |
getMasters() | Collection Master objects. |
getMetric() | Whether to use metric units in the drawing. |
getPages() | Collection Page objects. |
getRibbonX() | The Ribbon XML string that is passed to the document to customize the ribbon user interface. |
getSolutionXMLs() | XML value. |
getStart() | Indicates whether the document has been modified outside of Visio. |
getStyleSheets() | Collection StyleSheet objects. |
getUnusedStyles() | Get unused Styles |
getUserCustomUI() | The Ribbon XML string that is passed to the document to customize the Quick Access toolbar or the ribbon. |
getValidation() | Stores information about diagram validation for the document. |
getVbProjectData() | Contains the Microsoft Visual Basic for Applications project data in MIME (Multipurpose Internet Mail Extensions) encoded format. |
getVbaProject() | Gets the VbaProjectgetVbaProject(). |
getVersion() | The version number of the Visio instance. |
getWindows() | Contains the Window elements for a document. |
hasHiddenInfo() | Indicates whether this diagram has hidden information. |
hashCode() | |
layout(LayoutOptions options) | Lays out the shapes and/or reroutes the connectors for all pages of diagram. |
notify() | |
notifyAll() | |
print(String printerName) | Print the whole document to the specified printer,using the standard (no User Interface) print controller. |
print(String printerName, PrintSaveOptions options) | Print the whole document to the specified printer,using the standard (no User Interface) print controller. |
print(String printerName, String documentName) | Prints the document,using the standard (no User Interface) print controller and a document name. |
print(String printerName, String documentName, PrintSaveOptions options) | Prints the document,using the standard (no User Interface) print controller and a document name. |
removeHiddenInformation(int item) | Remove unused information |
removeMacro() | Removes VBA/macro from this diagram. |
save(OutputStream stream, SaveOptions saveOptions) | Save the diagram to the stream. |
save(OutputStream stream, int format) | Save the diagram to the stream. |
save(String filename, SaveOptions options) | Saves the document to a file using the specified save options. |
save(String filename, int format) | Saves the diagram data to the file. |
setBuildnum(long value) | For the description of this property, please see getBuildnum() |
setDocLangID(int value) | For the description of this property, please see getDocLangID() |
setEmailRoutingData(byte[] value) | For the description of this property, please see getEmailRoutingData() |
setFontDirs(String[] value) | Indicates the Fonts folder path |
setInterruptMonitor(AbstractInterruptMonitor value) | For the description of this property, please see getInterruptMonitor() |
setKey(String value) | For the description of this property, please see getKey() |
setMetric(int value) | For the description of this property, please see getMetric() |
setRibbonX(String value) | For the description of this property, please see getRibbonX() |
setStart(long value) | For the description of this property, please see getStart() |
setUserCustomUI(String value) | For the description of this property, please see getUserCustomUI() |
setVbProjectData(byte[] value) | For the description of this property, please see getVbProjectData() |
setVersion(String value) | For the description of this property, please see getVersion() |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
Diagram()
public Diagram()
Diagram(String filename)
public Diagram(String filename)
Public class constructor, loads the diagram from the file.
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String | The file name. |
Diagram(InputStream stream)
public Diagram(InputStream stream)
Public class constructor, loads the diagram from the stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The data stream. |
Diagram(InputStream stream, int format)
public Diagram(InputStream stream, int format)
Public class constructor, loads the diagram from the stream using predefined format.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The data stream. |
format | int | The data Aspose.Diagram.LoadFileFormat. |
Diagram(InputStream stream, LoadOptions options)
public Diagram(InputStream stream, LoadOptions options)
Public class constructor, loads the diagram from the stream using predefined load file options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The data stream. |
options | LoadOptions | The data LoadOptions. |
Diagram(String filename, int format)
public Diagram(String filename, int format)
Public class constructor, loads the diagram from the file using predefined format.
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String | The file name. |
format | int | The file format. |
Diagram(String filename, LoadOptions options)
public Diagram(String filename, LoadOptions options)
Public class constructor, loads the diagram from the file using predefined load file options.
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String | The file name. |
options | LoadOptions | The data LoadOptions. |
addMaster(Diagram srcDiagram, String masterName)
public int addMaster(Diagram srcDiagram, String masterName)
Adds master to diagram from source diagram by master’s Name or NameU.
Parameters:
Parameter | Type | Description |
---|---|---|
srcDiagram | Diagram | source diagram. |
masterName | java.lang.String | Master’s Name or NameU. |
Returns: int - The unique ID of the master within masters collection in this diagram.
addMaster(InputStream templateStream, int masterID)
public int addMaster(InputStream templateStream, int masterID)
Adds master to diagram from template stream by master’s ID.
Parameters:
Parameter | Type | Description |
---|---|---|
templateStream | java.io.InputStream | template stream. |
masterID | int | The unique ID of the master within masters collection in template. |
Returns: int - The unique ID of the master within masters collection in this diagram.
addMaster(InputStream templateStream, String masterName)
public int addMaster(InputStream templateStream, String masterName)
Adds master to diagram from template stream by master’s Name or NameU.
Parameters:
Parameter | Type | Description |
---|---|---|
templateStream | java.io.InputStream | template stream. |
masterName | java.lang.String | Master’s Name or NameU. |
Returns: int - The unique ID of the master within masters collection in this diagram.
addMaster(String templateFilePath, int masterID)
public int addMaster(String templateFilePath, int masterID)
Adds master to diagram from template file by master’s ID.
Parameters:
Parameter | Type | Description |
---|---|---|
templateFilePath | java.lang.String | Path to template file(can be vdx, vst or vsd format). |
masterID | int | The unique ID of the master within masters collection in template. |
Returns: int - The unique ID of the master within masters collection in this diagram.
addMaster(String templateFilePath, String masterName)
public int addMaster(String templateFilePath, String masterName)
Adds master to diagram from template file by master’s Name or NameU.
Parameters:
Parameter | Type | Description |
---|---|---|
templateFilePath | java.lang.String | Path to template file(can be vdx, vst or vsd format). |
masterName | java.lang.String | Master’s Name or NameU. |
Returns: int - The unique ID of the master within masters collection in this diagram.
addShape(Shape newShape, String masterName, int pageNumber)
public long addShape(Shape newShape, String masterName, int pageNumber)
Adds shape created by master to specific page.
Parameters:
Parameter | Type | Description |
---|---|---|
newShape | Shape | New shape objectShape. |
masterName | java.lang.String | Master’s name. |
pageNumber | int | Index of page. |
Returns: long - The unique ID of the shape within shapes collection on the specified page.
addShape(double pinX, double pinY, double width, double height, String masterName, int pageNumber)
public long addShape(double pinX, double pinY, double width, double height, String masterName, int pageNumber)
Adds shape created by master on page with defined PinX,PinY,Width and Height.
Parameters:
Parameter | Type | Description |
---|---|---|
pinX | double | Specifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page. |
pinY | double | Specifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page. |
width | double | Specifies the width of the shape in inches. |
height | double | Specifies the height of the shape in inches. |
masterName | java.lang.String | Master’s name. |
pageNumber | int | Index of page. |
Returns: long - The unique ID of the shape within shapes collection on the specified page.
addShape(double pinX, double pinY, String masterName, int pageNumber)
public long addShape(double pinX, double pinY, String masterName, int pageNumber)
Adds shape created by master on page with defined PinX and PinY.
Parameters:
Parameter | Type | Description |
---|---|---|
pinX | double | Specifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page. |
pinY | double | Specifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page. |
masterName | java.lang.String | Master’s name. |
pageNumber | int | Index of page. |
Returns: long - The unique ID of the shape within shapes collection on the specified page.
combine(Diagram secondDiagram)
public void combine(Diagram secondDiagram)
Combines another Diagram object.
Parameters:
Parameter | Type | Description |
---|---|---|
secondDiagram | Diagram | Another Diagram object. |
copyTheme(Diagram source)
public void copyTheme(Diagram source)
Copies Theme from a source Diagram.
Parameters:
Parameter | Type | Description |
---|---|---|
source | Diagram | source diagram. |
dispose()
public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
export(InputStream inputVsd, InputStream outputVdw)
public static void export(InputStream inputVsd, InputStream outputVdw)
Exports the diagram from vsd stream to vdw stream format. Not implemented yet.
Parameters:
Parameter | Type | Description |
---|---|---|
inputVsd | java.io.InputStream | vsd stream. |
outputVdw | java.io.InputStream | vdw stream. |
export(InputStream inputVsd, String outputVdw)
public static void export(InputStream inputVsd, String outputVdw)
Exports the diagram from vsd stream to *.vdw file format. Not implemented yet.
Parameters:
Parameter | Type | Description |
---|---|---|
inputVsd | java.io.InputStream | *.vsd file name. |
outputVdw | java.lang.String | vdw stream. |
export(String inputVsd, InputStream outputVdw)
public static void export(String inputVsd, InputStream outputVdw)
Exports the diagram from vsd file to vdw stream format. Not implemented yet.
Parameters:
Parameter | Type | Description |
---|---|---|
inputVsd | java.lang.String | *.vsd file name. |
outputVdw | java.io.InputStream | vdw stream. |
export(String inputVsd, String outputVdw)
public static void export(String inputVsd, String outputVdw)
Exports the diagram from vsd to vdw format. Not implemented yet.
Parameters:
Parameter | Type | Description |
---|---|---|
inputVsd | java.lang.String | *.vsd file name. |
outputVdw | java.lang.String | *.vdw file name. |
getActivePage()
public Page getActivePage()
Specifies the active page
Returns: Page
getBuildnum()
public long getBuildnum()
The build number of the Visio instance used to create the document.
Returns: long
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getColors()
public ColorEntryCollection getColors()
Contains the document’s color table. Each document contains a single color table, which lists the 24 standard colors that are available for application to objects such as shapes, text, and layers in the document.
Returns: ColorEntryCollection
getDataConnections()
public DataConnectionCollection getDataConnections()
Contains the DataConnection elements for the document.
Returns: DataConnectionCollection
getDataRecordSets()
public DataRecordSetCollection getDataRecordSets()
The collection of DataRecordset objects associated with a Document object.
Returns: DataRecordSetCollection
getDefaultFontDir()
public ArrayList getDefaultFontDir()
Get the Default Fonts folder path
Returns: java.util.ArrayList
getDocLangID()
public int getDocLangID()
The unique ID of the user-interface language the user has specified in Microsoft Office 2010 Language Preferences.
Returns: int
getDocumentProps()
public DocumentProperties getDocumentProps()
Contains document property elements such as the document’s title, author, and so on.
Returns: DocumentProperties
getDocumentSettings()
public DocumentSettings getDocumentSettings()
Contains elements that specify document settings.
Returns: DocumentSettings
getDocumentSheet()
public DocumentSheet getDocumentSheet()
Specifies a document’s ShapeSheet structure.
Returns: DocumentSheet
getEmailRoutingData()
public byte[] getEmailRoutingData()
Contains a MIME (Multipurpose Internet Mail Extensions) encoded MAPI e-mail routing slip for the document.
Returns: byte[]
getEventItems()
public EventItemCollection getEventItems()
Contains an EventItem element for each event to which an object should respond.
Returns: EventItemCollection
getFonts()
public FontCollection getFonts()
Contains a collection of Font elements
Returns: FontCollection
getHeaderFooter()
public HeaderFooter getHeaderFooter()
Contains elements for a document’s header and footer.
Returns: HeaderFooter
getInterruptMonitor()
public AbstractInterruptMonitor getInterruptMonitor()
the interrupt monitor.
Returns: AbstractInterruptMonitor
getKey()
public String getKey()
Indicates whether the document has been modified outside of Visio. If present, Visio will fully test the contents of the file. Omit for files you create outside of Visio.
Returns: java.lang.String
getMasters()
public MasterCollection getMasters()
Collection Master objects.
Returns: MasterCollection
getMetric()
public int getMetric()
Whether to use metric units in the drawing. Set this attribute to True (1) to use metric units; set it to False (0) to use English units.
Returns: int
getPages()
public PageCollection getPages()
Collection Page objects.
Returns: PageCollection
getRibbonX()
public String getRibbonX()
The Ribbon XML string that is passed to the document to customize the ribbon user interface.
Returns: java.lang.String
getSolutionXMLs()
public SolutionXMLCollection getSolutionXMLs()
XML value.
Returns: SolutionXMLCollection
getStart()
public long getStart()
Indicates whether the document has been modified outside of Visio. If present, Visio will fully test the contents of the file. Omit for files you create outside of Visio.
Returns: long
getStyleSheets()
public StyleSheetCollection getStyleSheets()
Collection StyleSheet objects.
Returns: StyleSheetCollection
getUnusedStyles()
public StyleSheetCollection getUnusedStyles()
Get unused Styles
Returns: StyleSheetCollection
getUserCustomUI()
public String getUserCustomUI()
The Ribbon XML string that is passed to the document to customize the Quick Access toolbar or the ribbon.
Returns: java.lang.String
getValidation()
public Validation getValidation()
Stores information about diagram validation for the document.
Returns: Validation
getVbProjectData()
public byte[] getVbProjectData()
Contains the Microsoft Visual Basic for Applications project data in MIME (Multipurpose Internet Mail Extensions) encoded format.
Returns: byte[]
getVbaProject()
public VbaProject getVbaProject()
Gets the VbaProjectgetVbaProject().
Returns: VbaProject
getVersion()
public String getVersion()
The version number of the Visio instance. Microsoft Visio 2010 = 14.
Returns: java.lang.String
getWindows()
public WindowCollection getWindows()
Contains the Window elements for a document.
Returns: WindowCollection
hasHiddenInfo()
public boolean hasHiddenInfo()
Indicates whether this diagram has hidden information.
Returns: boolean
hashCode()
public native int hashCode()
Returns: int
layout(LayoutOptions options)
public void layout(LayoutOptions options)
Lays out the shapes and/or reroutes the connectors for all pages of diagram.
Parameters:
Parameter | Type | Description |
---|---|---|
options | LayoutOptions | Using the LayoutOptions to configure options of layout. |
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
print(String printerName)
public void print(String printerName)
Print the whole document to the specified printer,using the standard (no User Interface) print controller. If printerName is Null or empty will be used default printer.
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | The name of the printer.Can be Null |
print(String printerName, PrintSaveOptions options)
public void print(String printerName, PrintSaveOptions options)
Print the whole document to the specified printer,using the standard (no User Interface) print controller. If printerName is Null or empty will be used default printer.
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | The name of the printer.Can be Null |
options | PrintSaveOptions | The print options. |
print(String printerName, String documentName)
public void print(String printerName, String documentName)
Prints the document,using the standard (no User Interface) print controller and a document name.
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | The name of the printer.Can be Null |
documentName | java.lang.String | The document name to display (for example, in a print status dialog box or printer queue) while printing the document. |
print(String printerName, String documentName, PrintSaveOptions options)
public void print(String printerName, String documentName, PrintSaveOptions options)
Prints the document,using the standard (no User Interface) print controller and a document name.
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | The name of the printer.Can be Null |
documentName | java.lang.String | The document name to display (for example, in a print status dialog box or printer queue) while printing the document. |
options | PrintSaveOptions | The print options. |
removeHiddenInformation(int item)
public void removeHiddenInformation(int item)
Remove unused information
Parameters:
Parameter | Type | Description |
---|---|---|
item | int | RemoveHiddenInfoItem. |
removeMacro()
public void removeMacro()
Removes VBA/macro from this diagram.
save(OutputStream stream, SaveOptions saveOptions)
public void save(OutputStream stream, SaveOptions saveOptions)
Save the diagram to the stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The file stream. |
saveOptions | SaveOptions | The save options. |
save(OutputStream stream, int format)
public void save(OutputStream stream, int format)
Save the diagram to the stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The file stream. |
format | int |
save(String filename, SaveOptions options)
public void save(String filename, SaveOptions options)
Saves the document to a file using the specified save options.
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String | The file name. |
options | SaveOptions | SaveOptions save diagram options. |
save(String filename, int format)
public void save(String filename, int format)
Saves the diagram data to the file.
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String | The file name. |
format | int | Aspose.Diagram.SaveFileFormat save file format. |
setBuildnum(long value)
public void setBuildnum(long value)
For the description of this property, please see getBuildnum()
Parameters:
Parameter | Type | Description |
---|---|---|
value | long |
setDocLangID(int value)
public void setDocLangID(int value)
For the description of this property, please see getDocLangID()
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setEmailRoutingData(byte[] value)
public void setEmailRoutingData(byte[] value)
For the description of this property, please see getEmailRoutingData()
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte[] |
setFontDirs(String[] value)
public void setFontDirs(String[] value)
Indicates the Fonts folder path
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String[] |
setInterruptMonitor(AbstractInterruptMonitor value)
public void setInterruptMonitor(AbstractInterruptMonitor value)
For the description of this property, please see getInterruptMonitor()
Parameters:
Parameter | Type | Description |
---|---|---|
value | AbstractInterruptMonitor |
setKey(String value)
public void setKey(String value)
For the description of this property, please see getKey()
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setMetric(int value)
public void setMetric(int value)
For the description of this property, please see getMetric()
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setRibbonX(String value)
public void setRibbonX(String value)
For the description of this property, please see getRibbonX()
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setStart(long value)
public void setStart(long value)
For the description of this property, please see getStart()
Parameters:
Parameter | Type | Description |
---|---|---|
value | long |
setUserCustomUI(String value)
public void setUserCustomUI(String value)
For the description of this property, please see getUserCustomUI()
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setVbProjectData(byte[] value)
public void setVbProjectData(byte[] value)
For the description of this property, please see getVbProjectData()
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte[] |
setVersion(String value)
public void setVersion(String value)
For the description of this property, please see getVersion()
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |