|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.DiagramBase
com.mindfusion.diagramming.DiagramDocument
public class DiagramDocument
Represents a collection of diagram pages.
Constructor Summary | |
---|---|
DiagramDocument()
|
Method Summary | |
---|---|
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 |
loadFrom(java.io.InputStream in)
Loads the document contents from a stream. |
void |
loadFromFile(java.lang.String fileName)
Loads the document from the specified file. |
void |
loadFromString(java.lang.String str)
Loads a diagram from the specified string. |
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 |
saveTo(java.io.OutputStream out)
Saves the diagram contents into a stream. |
void |
saveToFile(java.lang.String fileName)
Saves the document to the specified file in a binary format. |
java.lang.String |
saveToString()
Saves the diagram contents into a string. |
java.lang.String |
saveToString(int format,
boolean includeUnalteredProperties)
Saves the diagram contents into a string. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiagramDocument()
Method Detail |
---|
public void saveToFile(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException
fileName
- The full path and name of the disk file where
the document should be saved.
java.io.FileNotFoundException
java.io.IOException
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.IOException
XmlException
public void saveToXml(java.io.OutputStream stream, boolean includeUnalteredProperties) throws XmlException, java.io.UnsupportedEncodingException
stream
- An OutputStream
where the XML markup should be serialized.
XmlException
java.io.UnsupportedEncodingException
public 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.
XmlException
java.io.IOException
org.xml.sax.SAXException
public void loadFromXml(org.w3c.dom.Document document)
Document
object.
document
- A Document
object from which to load the diagram data.public void loadFromFile(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException
fileName
- The name of the file to load from.
java.io.FileNotFoundException
java.io.IOException
public void saveTo(java.io.OutputStream out) throws java.io.IOException
out
- An OutputStream
where
the diagram contents should be saved.
java.io.IOException
public void loadFrom(java.io.InputStream in) throws java.io.IOException
in
- An InputStream
from which to load the diagram contents.
java.io.IOException
public java.lang.String saveToString()
String
containing the base64 encoded diagram contents.public java.lang.String saveToString(int format, boolean includeUnalteredProperties)
format
- A SaveToStringFormat
constant indicating the output format.includeUnalteredProperties
- true to serialize all property;
false to serialize only properties with non-default values.
public void loadFromString(java.lang.String str)
public void addDiagramListener(DiagramListener listener)
DiagramBase
listener
so that it will receive events when
users create, modify or delete diagram items.
addDiagramListener
in class DiagramBase
listener
- An object implementing the DiagramListener
interface.public void removeDiagramListener(DiagramListener listener)
DiagramBase
listener
so that it will no longer
receive diagram events.
removeDiagramListener
in class DiagramBase
listener
- An object implementing the DiagramListener
interface.public com.mindfusion.common.ObservableList<DiagramPage> getPages()
public boolean getDirty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |