|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.document.SerializeGraphDocument
Implements the CreekDocument interface for the serialize file format with the graph model. This is instantiated when the CreekDocumentGroup opens a file with the extension "km".
,
,
,
Serialized FormField Summary | |
protected boolean |
dirty
True if document is dirty and needs saving. |
protected javax.swing.event.EventListenerList |
listeners
List of event listeners. |
protected GraphModel |
model
Our model. |
protected java.lang.String |
title
|
protected boolean |
titled
True if the document is titled and has a name. |
protected ConceptView |
view
Our view. |
Constructor Summary | |
SerializeGraphDocument()
Creates a new SerializeGraphDocument object. |
Method Summary | |
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener l)
Registers an UndoableEditListener with this document. |
void |
close()
We're being shutdown, remove listeners from lists. |
protected void |
fireEdit(javax.swing.undo.UndoableEdit ue)
Fires an undoable edit event to all the listeners registered for such events. |
KnowledgeModel |
getKnowledgeModel()
|
CreekModel |
getModel()
Returns the reference to the object acting as the model for this document. |
java.lang.String |
getTitle()
Returns the name of the file this document is reading and writing to. |
ConceptView |
getView()
Returns the reference to the object acting as the view for this document. |
boolean |
isDirty()
Returns the current dirty status of this document. |
boolean |
isTitled()
Returns true if the file is currently named. |
void |
modelChanged(ModelChangeEvent e)
Returns the reference to the file object for this document. |
void |
open()
The document is opened. |
boolean |
performCommand(CreekCommand command)
Perform the given command and fire an undoable edit event. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
The state of the model changed, mark ourselves dirty. |
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
Removes an UndoableEditListener from this document. |
boolean |
revert()
Reverts this document (the graph data) to the last-saved version of the disk file. |
boolean |
revert(Graph g,
java.lang.String savedTitle)
|
void |
setTitle(java.lang.String title)
Returns the reference to the file object for this document. |
void |
setTitled(boolean titled)
Tells the document whether it has a title or not. |
void |
setView(ConceptView view)
Sets the view this document is associated with. |
java.lang.String |
toString()
|
protected void |
updateModel(Entity c)
|
protected void |
updateModel(Relation c)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected GraphModel model
protected transient ConceptView view
protected transient boolean dirty
protected boolean titled
protected java.lang.String title
protected transient javax.swing.event.EventListenerList listeners
Constructor Detail |
public SerializeGraphDocument()
Method Detail |
public void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
addUndoableEditListener
in interface CreekDocument
l
- listern to add to this documentremoveUndoableEditListener(javax.swing.event.UndoableEditListener)
public void open()
CreekDocument
open
in interface CreekDocument
public void close()
close
in interface CreekDocument
protected void fireEdit(javax.swing.undo.UndoableEdit ue)
ue
- undoable editpublic CreekModel getModel()
getModel
in interface CreekDocument
public java.lang.String getTitle()
getTitle
in interface CreekDocument
public void setTitle(java.lang.String title)
CreekDocument
setTitle
in interface CreekDocument
public ConceptView getView()
getView
in interface CreekDocument
public boolean isDirty()
isDirty
in interface CreekDocument
public boolean isTitled()
isTitled
in interface CreekDocument
public boolean performCommand(CreekCommand command)
performCommand
in interface CreekDocument
command
- command to be performed
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- change eventpublic void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
removeUndoableEditListener
in interface CreekDocument
l
- listern to remove from this documentaddUndoableEditListener(javax.swing.event.UndoableEditListener)
public boolean revert()
revert
in interface CreekDocument
public boolean revert(Graph g, java.lang.String savedTitle)
revert
in interface CreekDocument
public void setTitled(boolean titled)
setTitled
in interface CreekDocument
titled
- true if document has a titledpublic void setView(ConceptView view)
setView
in interface CreekDocument
view
- view objectpublic java.lang.String toString()
public KnowledgeModel getKnowledgeModel()
getKnowledgeModel
in interface Context
public void modelChanged(ModelChangeEvent e)
modelChanged
in interface ModelChangeListener
protected void updateModel(Entity c)
protected void updateModel(Relation c)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |