|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.document.AbstractDocument
Class AbstractDocument implements functionality common to
all Document implementations.
| Field Summary |
| Fields inherited from interface com.tensegrity.gui.document.Document |
GLUE_LEFTBOTTOM, GLUE_LEFTCENTEREXTEND, GLUE_LEFTTOP, GLUE_RIGHTBOTTOM, GLUE_RIGHTCENTEREXTEND, GLUE_RIGHTTOP, TYPE_FIXED_SIZE, TYPE_PACK_IS_OK, TYPE_TOOLDOCUMENT |
| Constructor Summary | |
AbstractDocument(java.lang.String name)
Constructs a new document, |
|
| Method Summary | |
void |
closeHandler()
To be overridden by subclasses for doing cleanup work. |
int |
getCopyCounter()
Returns the copy_counter and increments it by one afterwards. |
DocumentDataProvider |
getDocumentDataProvider(java.lang.String key)
Returns the DocumentDataProvider that can provide
the requested information described by the given key. |
java.lang.Object |
getDocumentSetting(java.lang.String key)
Retrieves the value of an application defined document setting that has been previously stored in this instance. |
AttributeList |
getDocumentSettings()
Returns all document settings serialized as AttributeList. |
java.io.File |
getFile()
Gets the file of this document if it was saved or loaded before. |
int |
getFlags()
Returns flags describing the nature of the document. |
java.lang.String |
getName()
Retrieves the name of the document. |
boolean |
isModified()
Returns whether the document needs saving or not. |
void |
setDocumentSetting(java.lang.String key,
java.lang.Object value)
Stores the value for an application defined document setting. |
void |
setDocumentSettings(AttributeList settings)
Sets document settings from an AttributeList structure that
has usually been read from a file. |
void |
setFile(java.io.File file)
Sets the file of this document. |
void |
setModified()
Sets the document to be unmodified. |
void |
setName(java.lang.String name)
Sets the name of the document. |
void |
setSelected(boolean b)
Sets the selected flag of this container. |
void |
setUnmodified()
Sets the document to be unmodified. |
abstract void |
update(Observable o,
java.lang.Object arg)
Triggers a repaint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.tensegrity.gui.container.Container |
getApplicationFrame |
| Constructor Detail |
public AbstractDocument(java.lang.String name)
name - the document's name.| Method Detail |
public int getFlags()
getFlags in interface Documentpublic java.lang.String getName()
getName in interface Containerpublic void setName(java.lang.String name)
setName in interface Containername - the document's name.public int getCopyCounter()
getCopyCounter in interface Documentpublic final java.io.File getFile()
getFile in interface Documentpublic final void setFile(java.io.File file)
setFile in interface Documentfile - the file of this document.
public abstract void update(Observable o,
java.lang.Object arg)
update in interface Observero - the observable that triggered the call.arg - an object carrying additional information.public void closeHandler()
closeHandler in interface Documentpublic boolean isModified()
isModified in interface Documentpublic void setUnmodified()
setUnmodified in interface Documentpublic void setModified()
setModified in interface Documentpublic void setSelected(boolean b)
Container
setSelected in interface Containerb - true to indicate that this container is
selected.
public void setDocumentSetting(java.lang.String key,
java.lang.Object value)
DocumentGraphDocumentReader and
GraphDocumentWriter). You may pass null as value to remove
the setting from the document.
setDocumentSetting in interface Documentkey - The key to store the setting undervalue - The new value for the setting or null to remove the settingpublic java.lang.Object getDocumentSetting(java.lang.String key)
Document
getDocumentSetting in interface Documentkey - The key of the setting
Document.setDocumentSetting(String, Object)public AttributeList getDocumentSettings()
DocumentGraphDocumentWriter to serialize the document.
getDocumentSettings in interface Documentpublic void setDocumentSettings(AttributeList settings)
DocumentAttributeList structure that
has usually been read from a file. The document will parse the contents
and will store the settings in an internal map.
Afterwards each of the settings will be available through the method
Document.getDocumentSetting(String).
setDocumentSettings in interface Documentsettings - all document settings as AttributeListpublic DocumentDataProvider getDocumentDataProvider(java.lang.String key)
DocumentDocumentDataProvider that can provide
the requested information described by the given key. The method returns
null, if there is no matching provider.
getDocumentDataProvider in interface Documentkey - The key describing the requested information
DocumentDataProvider implementationDocumentDataProvider
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||