public class DiagramDocument extends DiagramBase
| Constructor and Description |
|---|
DiagramDocument() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDiagramListener(DiagramListener listener)
Registers
listener so that it will receive events when
users create, modify or delete diagram items. |
boolean |
getDirty()
Gets a value indicating whether the document has changed since the last save.
|
com.mindfusion.common.ObservableList<DiagramPage> |
getPages()
Gets a list of the diagram pages contained in this document.
|
void |
loadFromXml(org.w3c.dom.Document document)
Loads the document from the specified
Document object. |
void |
loadFromXml(java.lang.String fileName)
Loads the document from the specified XML file.
|
void |
removeDiagramListener(DiagramListener listener)
Unregisters
listener so that it will no longer
receive diagram events. |
void |
saveToXml(org.w3c.dom.Document document)
Saves the document to the specified
Document object. |
void |
saveToXml(org.w3c.dom.Document document,
boolean includeUnalteredProperties)
Saves the document to the specified
Document object. |
void |
saveToXml(java.io.OutputStream stream,
boolean includeUnalteredProperties)
Saves the diagram to the specified XML document.
|
void |
saveToXml(java.lang.String fileName)
Saves the diagram to the specified XML document.
|
public void saveToXml(java.lang.String fileName)
throws java.io.IOException,
XmlException
fileName - The full path and name of the disk file where the diagram should be saved.java.io.IOExceptionXmlExceptionpublic void saveToXml(java.io.OutputStream stream,
boolean includeUnalteredProperties)
throws XmlException,
java.io.UnsupportedEncodingException
stream - An OutputStream where the XML markup should be serialized.XmlExceptionjava.io.UnsupportedEncodingExceptionpublic void saveToXml(org.w3c.dom.Document document)
Document object.document - A Document object where the document should be saved.public void saveToXml(org.w3c.dom.Document document,
boolean includeUnalteredProperties)
Document object.document - A XmlDocument object where the document should be saved.includeUnalteredProperties - true if properties that have their
default value should be saved; otherwise, false.public void loadFromXml(java.lang.String fileName)
throws XmlException,
java.io.IOException,
org.xml.sax.SAXException
fileName - The name of the XML file the data should be read from.XmlExceptionjava.io.IOExceptionorg.xml.sax.SAXExceptionpublic void loadFromXml(org.w3c.dom.Document document)
Document object.document - A Document object from which to load the diagram data.public void addDiagramListener(DiagramListener listener)
DiagramBaselistener so that it will receive events when
users create, modify or delete diagram items.addDiagramListener in class DiagramBaselistener - An object implementing the DiagramListener interface.public void removeDiagramListener(DiagramListener listener)
DiagramBaselistener so that it will no longer
receive diagram events.removeDiagramListener in class DiagramBaselistener - An object implementing the DiagramListener interface.public com.mindfusion.common.ObservableList<DiagramPage> getPages()
public boolean getDirty()