java.lang.Object
com.aspose.diagram.Diagram
public class Diagram
- extends java.lang.Object
Root element of Visio objects hierarchy.
|
Constructor Summary |
Diagram()
|
Diagram(java.lang.String filename)
Public class constructor,
loads the diagram from the file.
|
Diagram(java.io.InputStream stream)
Public class constructor,
loads the diagram from the stream.
|
Diagram(java.io.InputStream stream, int format)
Public class constructor,
loads the diagram from the stream using predefined format.
|
Diagram(java.io.InputStream stream, LoadOptions options)
Public class constructor,
loads the diagram from the stream using predefined load file options.
|
Diagram(java.lang.String filename, int format)
Public class constructor,
loads the diagram from the file using predefined format.
|
Diagram(java.lang.String filename, LoadOptions options)
Public class constructor,
loads the diagram from the file using predefined load file options.
|
|
Method Summary |
int | addMaster(Diagram srcDiagram, java.lang.String masterName) | |
|
Adds master to diagram from source diagram by master's Name or NameU.
|
int | addMaster(java.io.InputStream templateStream, int masterID) | |
|
Adds master to diagram from template stream by master's ID.
|
int | addMaster(java.io.InputStream templateStream, java.lang.String masterName) | |
|
Adds master to diagram from template stream by master's Name or NameU.
|
int | addMaster(java.lang.String templateFilePath, int masterID) | |
|
Adds master to diagram from template file by master's ID.
|
int | addMaster(java.lang.String templateFilePath, java.lang.String masterName) | |
|
Adds master to diagram from template file by master's Name or NameU.
|
long | addShape(Shape newShape, java.lang.String masterName, int pageNumber) | |
|
Adds shape created by master to specific page.
|
long | addShape(double pinX, double pinY, double width, double height, java.lang.String masterName, int pageNumber) | |
|
Adds shape created by master on page with defined PinX,PinY,Width and Height.
|
long | addShape(double pinX, double pinY, java.lang.String masterName, int pageNumber) | |
|
Adds shape created by master on page with defined PinX and PinY.
|
void | combine(Diagram secondDiagram) | |
|
Combines another Diagram object.
|
void | copyTheme(Diagram source) | |
|
Copies Theme from a source Diagram.
|
void | dispose() | |
|
Performs application-defined tasks associated with freeing, releasing, or
resetting unmanaged resources.
|
static void | export(java.lang.String inputVsd, java.lang.String outputVdw) | |
|
Exports the diagram from vsd to vdw format. Not implemented yet.
|
java.util.ArrayList | getDefaultFontDir() | |
|
Get the Default Fonts folder path
|
StyleSheetCollection | getUnusedStyles() | |
|
Get unused Styles
|
boolean | hasHiddenInfo() | |
|
Indicates whether this diagram has hidden information.
|
void | layout(LayoutOptions options) | |
|
Lays out the shapes and/or reroutes the connectors for all pages of diagram.
|
void | print(java.lang.String printerName) | |
|
Print the whole document to the specified printer,using the standard (no User Interface) print controller.
|
void | print(java.lang.String printerName, PrintSaveOptions options) | |
|
Print the whole document to the specified printer,using the standard (no User Interface) print controller.
|
void | print(java.lang.String printerName, java.lang.String documentName) | |
|
Prints the document,using the standard (no User Interface) print controller and a document name.
|
void | print(java.lang.String printerName, java.lang.String documentName, PrintSaveOptions options) | |
|
Prints the document,using the standard (no User Interface) print controller and a document name.
|
void | removeHiddenInformation(int item) | |
|
Remove unused information
|
void | removeMacro() | |
|
Removes VBA/macro from this diagram.
|
void | save(java.io.OutputStream stream, SaveOptions saveOptions) | |
|
Save the diagram to the stream.
|
void | save(java.io.OutputStream stream, int format) | |
|
Save the diagram to the stream.
|
void | save(java.lang.String filename, SaveOptions options) | |
|
Saves the document to a file using the specified save options.
|
void | save(java.lang.String filename, int format) | |
|
Saves the diagram data to the file.
|
Diagram
public Diagram()
-
Diagram
public Diagram(java.lang.String filename)
throws java.lang.Exception
-
Public class constructor,
loads the diagram from the file.
- Parameters:
filename - The file name.
Diagram
public Diagram(java.io.InputStream stream)
throws java.lang.Exception
-
Public class constructor,
loads the diagram from the stream.
- Parameters:
stream - The data stream.
Diagram
public Diagram(java.io.InputStream stream, int format)
throws java.lang.Exception
-
Public class constructor,
loads the diagram from the stream using predefined format.
- Parameters:
stream - The data stream.format - A LoadFileFormat value. The data LoadFileFormat.
Diagram
public Diagram(java.io.InputStream stream, LoadOptions options)
throws java.lang.Exception
-
Public class constructor,
loads the diagram from the stream using predefined load file options.
- Parameters:
stream - The data stream.options - The data LoadOptions.
Diagram
public Diagram(java.lang.String filename, int format)
throws java.lang.Exception
-
Public class constructor,
loads the diagram from the file using predefined format.
- Parameters:
filename - The file name.format - A LoadFileFormat value. The file format.
Diagram
public Diagram(java.lang.String filename, LoadOptions options)
throws java.lang.Exception
-
Public class constructor,
loads the diagram from the file using predefined load file options.
- Parameters:
filename - The file name.options - The data LoadOptions.
|
Property Getters/Setters Detail |
getStart/setStart | |
public long getStart() / public void setStart(long value)
|
-
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.
setFontDirs | |
public void setFontDirs(java.lang.String[] value)
|
-
Indicates the Fonts folder path
getKey/setKey | |
public java.lang.String getKey() / public void setKey(java.lang.String value)
|
-
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.
getMetric/setMetric | |
public int getMetric() / public void setMetric(int value)
|
-
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.
The value of the property is BOOL integer constant.
getBuildnum/setBuildnum | |
public long getBuildnum() / public void setBuildnum(long value)
|
-
The build number of the Visio instance used to create the document.
getVersion/setVersion | |
public java.lang.String getVersion() / public void setVersion(java.lang.String value)
|
-
The version number of the Visio instance. Microsoft Visio 2010 = 14.
getDocLangID/setDocLangID | |
public int getDocLangID() / public void setDocLangID(int value)
|
-
The unique ID of the user-interface language the user has specified in Microsoft Office 2010 Language Preferences.
-
Collection StyleSheet objects.
-
Collection Master objects.
-
Collection Page objects.
-
Contains document property elements such as the document's title, author, and so on.
-
Contains elements that specify document settings.
-
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.
-
Contains a collection of Font elements
-
Specifies a document's ShapeSheet structure.
getActivePage | |
public Page getActivePage()
|
-
Specifies the active page
-
Contains the Window elements for a document.
-
Contains an EventItem element for each event to which an object should respond.
-
Contains elements for a document's header and footer.
getVbProjectData/setVbProjectData | |
public byte[] getVbProjectData() / public void setVbProjectData(byte[] value)
|
-
Contains the Microsoft Visual Basic for Applications project data in MIME (Multipurpose Internet Mail Extensions) encoded format.
getEmailRoutingData/setEmailRoutingData | |
public byte[] getEmailRoutingData() / public void setEmailRoutingData(byte[] value)
|
-
Contains a MIME (Multipurpose Internet Mail Extensions) encoded MAPI e-mail routing slip for the document.
-
Contains the DataConnection elements for the document.
-
The collection of DataRecordset objects associated with a Document object.
getRibbonX/setRibbonX | |
public java.lang.String getRibbonX() / public void setRibbonX(java.lang.String value)
|
-
The Ribbon XML string that is passed to the document to customize the ribbon user interface.
getUserCustomUI/setUserCustomUI | |
public java.lang.String getUserCustomUI() / public void setUserCustomUI(java.lang.String value)
|
-
The Ribbon XML string that is passed to the document to customize the Quick Access toolbar or the ribbon.
-
Stores information about diagram validation for the document.
-
XML value.
-
Gets the VbaProjectVbaProject.
-
Gets and sets the interrupt monitor.
save | |
public void save(java.lang.String filename, int format)
throws java.lang.Exception |
-
Saves the diagram data to the file.
- Parameters:
filename - The file name.format - A SaveFileFormat value. SaveFileFormat save file format.
save | |
public void save(java.io.OutputStream stream, int format)
throws java.lang.Exception |
-
Save the diagram to the stream.
- Parameters:
stream - The file stream.saveFormat - The save file format type.
- Parameters:
format - A SaveFileFormat value.
save | |
public void save(java.io.OutputStream stream, SaveOptions saveOptions)
throws java.lang.Exception |
-
Save the diagram to the stream.
- Parameters:
stream - The file stream.saveOptions - The save options.
save | |
public void save(java.lang.String filename, SaveOptions options)
throws java.lang.Exception |
-
Saves the document to a file using the specified save options.
- Parameters:
filename - The file name.options - SaveOptions save diagram options.
export | |
public static void export(java.lang.String inputVsd, java.lang.String outputVdw)
throws java.lang.Exception |
-
Exports the diagram from vsd to vdw format. Not implemented yet.
- Parameters:
inputVsd - *.vsd file name.outputVdw - *.vdw file name.
dispose | |
public void dispose() |
-
Performs application-defined tasks associated with freeing, releasing, or
resetting unmanaged resources.
copyTheme | |
public void copyTheme(Diagram source) |
-
Copies Theme from a source Diagram.
- Parameters:
source - source diagram.
combine | |
public void combine(Diagram secondDiagram)
throws java.lang.Exception |
-
Combines another Diagram object.
- Parameters:
secondDiagram - Another Diagram object.
layout | |
public void layout(LayoutOptions options)
throws java.lang.Exception |
-
Lays out the shapes and/or reroutes the connectors for all pages of diagram.
- Parameters:
options - Using the LayoutOptions to configure options of layout.
addMaster | |
public int addMaster(Diagram srcDiagram, java.lang.String masterName)
throws java.lang.Exception |
-
Adds master to diagram from source diagram by master's Name or NameU.
- Parameters:
srcDiagram - source diagram.masterName - Master's Name or NameU.
- Returns:
- The unique ID of the master within masters collection in this diagram.
addMaster | |
public int addMaster(java.io.InputStream templateStream, java.lang.String masterName)
throws java.lang.Exception |
-
Adds master to diagram from template stream by master's Name or NameU.
- Parameters:
templateStream - template stream.masterName - Master's Name or NameU.
- Returns:
- The unique ID of the master within masters collection in this diagram.
addMaster | |
public int addMaster(java.io.InputStream templateStream, int masterID)
throws java.lang.Exception |
-
Adds master to diagram from template stream by master's ID.
- Parameters:
templateStream - template stream.masterID - The unique ID of the master within masters collection in template.
- Returns:
- The unique ID of the master within masters collection in this diagram.
addMaster | |
public int addMaster(java.lang.String templateFilePath, java.lang.String masterName)
throws java.lang.Exception |
-
Adds master to diagram from template file by master's Name or NameU.
- Parameters:
templateFilePath - Path to template file(can be vdx, vst or vsd format).masterName - Master's Name or NameU.
- Returns:
- The unique ID of the master within masters collection in this diagram.
addMaster | |
public int addMaster(java.lang.String templateFilePath, int masterID)
throws java.lang.Exception |
-
Adds master to diagram from template file by master's ID.
- Parameters:
templateFilePath - Path to template file(can be vdx, vst or vsd format).masterID - The unique ID of the master within masters collection in template.
- Returns:
- The unique ID of the master within masters collection in this diagram.
hasHiddenInfo | |
public boolean hasHiddenInfo() |
-
Indicates whether this diagram has hidden information.
removeHiddenInformation | |
public void removeHiddenInformation(int item) |
-
Remove unused information
- Parameters:
item - RemoveHiddenInfoItem.
-
Get unused Styles
addShape | |
public long addShape(Shape newShape, java.lang.String masterName, int pageNumber)
throws java.lang.Exception |
-
Adds shape created by master to specific page.
- Parameters:
newShape - New shape objectShape.masterName - Master's name.pageNumber - Index of page.
- Returns:
- The unique ID of the shape within shapes collection on the specified page.
addShape | |
public long addShape(double pinX, double pinY, java.lang.String masterName, int pageNumber)
throws java.lang.Exception |
-
Adds shape created by master on page with defined PinX and PinY.
- Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.masterName - Master's name.pageNumber - Index of page.
- Returns:
- The unique ID of the shape within shapes collection on the specified page.
addShape | |
public long addShape(double pinX, double pinY, double width, double height, java.lang.String masterName, int pageNumber)
throws java.lang.Exception |
-
Adds shape created by master on page with defined PinX,PinY,Width and Height.
- Parameters:
pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.width - Specifies the width of the shape in inches.height - Specifies the height of the shape in inches.masterName - Master's name.pageNumber - Index of page.
- Returns:
- The unique ID of the shape within shapes collection on the specified page.
print | |
public void print(java.lang.String printerName)
throws java.lang.Exception |
-
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:
printerName - The name of the printer.Can be Null
print | |
public void print(java.lang.String printerName, PrintSaveOptions options)
throws java.lang.Exception |
-
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:
printerName - The name of the printer.Can be Nulloptions - The print options.
print | |
public void print(java.lang.String printerName, java.lang.String documentName, PrintSaveOptions options)
throws java.lang.Exception |
-
Prints the document,using the standard (no User Interface) print controller and a document name.
- Parameters:
printerName - The name of the printer.Can be NulldocumentName - The document name to display (for example, in a print status dialog box or printer queue) while printing the document. options - The print options.
print | |
public void print(java.lang.String printerName, java.lang.String documentName)
throws java.lang.Exception |
-
Prints the document,using the standard (no User Interface) print controller and a document name.
- Parameters:
printerName - The name of the printer.Can be NulldocumentName - The document name to display (for example, in a print status dialog box or printer queue) while printing the document.
getDefaultFontDir | |
public java.util.ArrayList getDefaultFontDir()
throws java.lang.Exception |
-
Get the Default Fonts folder path
removeMacro | |
public void removeMacro() |
-
Removes VBA/macro from this diagram.
See Also:
Aspose.Diagram Documentation - the home page for the Aspose.Diagram Product Documentation.
Aspose.Diagram Support Forum - our preferred method of support.