|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
com.jgraph.graph.DefaultGraphModel.GraphModelEdit
An implementation of GraphModelChange that can be added to the model event.
Field Summary | |
protected java.util.Map |
attributeMap
|
protected java.util.Map |
cellViews
|
protected java.lang.Object[] |
changed
|
protected ConnectionSet |
connectionSet
|
protected java.lang.Object[] |
context
|
protected java.lang.Object[] |
insert
|
protected java.lang.Object[] |
inserted
|
protected java.util.Map |
lastPropertyMap
|
protected ParentMap |
parentMap
|
protected java.util.Map |
propertyMap
|
protected java.lang.Object[] |
remove
|
protected java.lang.Object[] |
removed
|
Fields inherited from class javax.swing.undo.CompoundEdit |
edits |
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
Constructor Summary | |
DefaultGraphModel.GraphModelEdit(ConnectionSet cs,
java.util.Map propertyMap,
ParentMap parentMap)
Constructs an edit that represents a change. |
|
DefaultGraphModel.GraphModelEdit(java.lang.Object[] removed,
ConnectionSet cs,
ParentMap parentMap)
Constructs an edit that represents a remove. |
|
DefaultGraphModel.GraphModelEdit(java.lang.Object[] inserted,
ConnectionSet cs,
ParentMap parentMap,
java.util.Map attributeMap)
Constructs an edit that represents an insert. |
|
DefaultGraphModel.GraphModelEdit(java.lang.Object[] inserted,
java.lang.Object[] removed,
ConnectionSet connectionSet,
java.util.Map propertyMap,
ParentMap parentMap,
java.util.Map attributeMap)
Constructs an edit record. |
Method Summary | |
void |
execute()
Execute this edit such that the next invocation to this method will invert the last execution. |
java.util.Map |
getAttributeMap()
Returns a map of (object, view attributes). |
java.lang.Object[] |
getChanged()
Returns the cells that have changed. |
java.lang.Object[] |
getContext()
Returns the objects that have not changed explicitly, but implicitly because one of their dependent cells has changed. |
java.lang.Object[] |
getInserted()
Returns the cells that were inserted. |
java.lang.Object[] |
getRemoved()
Returns the cells that were inserted. |
java.lang.Object |
getSource()
Returns the source of this change. |
java.util.Map |
getStoredAttributeMap()
Returns a map that contains (object, map) pairs of the attributes that have been stored in the model. |
CellView[] |
getViews(GraphView view)
Allows a GraphView to retrieve an array of
CellViews that was previously stored with
putViews(GraphView, CellView[]) . |
protected void |
handleEmptyGroups(java.lang.Object[] groups)
Adds the groups that become empty to the cells that will be removed. |
boolean |
isSignificant()
|
void |
putViews(GraphView view,
CellView[] views)
Allows a GraphView to store an array of
CellViews (used for command history). |
void |
redo()
Redoes a change. |
java.lang.String |
toString()
|
void |
undo()
Undoes a change. |
Methods inherited from class javax.swing.undo.CompoundEdit |
addEdit, canRedo, canUndo, die, end, getPresentationName, getRedoPresentationName, getUndoPresentationName, isInProgress, lastEdit |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
replaceEdit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.Object[] insert
protected java.lang.Object[] changed
protected java.lang.Object[] remove
protected java.lang.Object[] context
protected java.lang.Object[] inserted
protected java.lang.Object[] removed
protected java.util.Map propertyMap
protected java.util.Map attributeMap
protected java.util.Map lastPropertyMap
protected ParentMap parentMap
protected ConnectionSet connectionSet
protected java.util.Map cellViews
Constructor Detail |
public DefaultGraphModel.GraphModelEdit(java.lang.Object[] removed, ConnectionSet cs, ParentMap parentMap)
public DefaultGraphModel.GraphModelEdit(java.lang.Object[] inserted, ConnectionSet cs, ParentMap parentMap, java.util.Map attributeMap)
public DefaultGraphModel.GraphModelEdit(ConnectionSet cs, java.util.Map propertyMap, ParentMap parentMap)
public DefaultGraphModel.GraphModelEdit(java.lang.Object[] inserted, java.lang.Object[] removed, ConnectionSet connectionSet, java.util.Map propertyMap, ParentMap parentMap, java.util.Map attributeMap)
removed
- a set of elements that were removedinserted
- a set of roots that were insertedMethod Detail |
protected void handleEmptyGroups(java.lang.Object[] groups)
public boolean isSignificant()
isSignificant
in interface javax.swing.undo.UndoableEdit
public java.lang.Object getSource()
getSource
in interface GraphModelEvent.GraphViewChange
public java.lang.Object[] getChanged()
getChanged
in interface GraphModelEvent.GraphViewChange
public java.lang.Object[] getContext()
getContext
in interface GraphModelEvent.GraphViewChange
public java.lang.Object[] getInserted()
getInserted
in interface GraphModelEvent.GraphModelChange
public java.lang.Object[] getRemoved()
getRemoved
in interface GraphModelEvent.GraphModelChange
public java.util.Map getStoredAttributeMap()
getStoredAttributeMap
in interface GraphModelEvent.GraphModelChange
public java.util.Map getAttributeMap()
getAttributeMap
in interface GraphModelEvent.GraphViewChange
public void redo() throws javax.swing.undo.CannotRedoException
redo
in interface javax.swing.undo.UndoableEdit
javax.swing.undo.CannotRedoException
- if the change cannot be redonepublic void undo() throws javax.swing.undo.CannotUndoException
undo
in interface javax.swing.undo.UndoableEdit
javax.swing.undo.CannotUndoException
- if the change cannot be undonepublic void execute()
public void putViews(GraphView view, CellView[] views)
GraphModelEvent.GraphModelChange
GraphView
to store an array of
CellViews
(used for command history).
putViews
in interface GraphModelEvent.GraphModelChange
public CellView[] getViews(GraphView view)
GraphModelEvent.GraphModelChange
GraphView
to retrieve an array of
CellViews
that was previously stored with
putViews(GraphView, CellView[])
.
getViews
in interface GraphModelEvent.GraphModelChange
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |