|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.undo.AbstractUndoableEdit
|
+--javax.swing.undo.CompoundEdit
|
+--org.jgraph.graph.DefaultGraphModel.GraphModelEdit
An implementation of GraphModelChange that can be added to the model event.
| Field Summary | |
protected Map |
attributes
|
protected Map |
cellViews
|
protected Object[] |
changed
|
protected ConnectionSet |
connectionSet
|
protected Object[] |
context
|
protected Object[] |
insert
|
protected Object[] |
inserted
|
protected ParentMap |
parentMap
|
protected Map |
previousAttributes
|
protected ConnectionSet |
previousConnectionSet
|
protected ParentMap |
previousParentMap
|
protected Object[] |
remove
|
protected 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(Object[] inserted,
Object[] removed,
Map attributes,
ConnectionSet connectionSet,
ParentMap parentMap)
Constructs an edit record. |
|
| Method Summary | |
protected void |
changeChildCount(Map childCount,
Object parent,
int change)
|
void |
execute()
Execute this edit such that the next invocation to this method will invert the last execution. |
Object[] |
filterParents(Map childCount,
int children)
|
Map |
getAttributes()
Returns a map of (object, view attributes). |
Object[] |
getChanged()
Returns the cells that have changed. |
ConnectionSet |
getConnectionSet()
Returns the connectionSet. |
Object[] |
getContext()
Returns the objects that have not changed explicitly, but implicitly because one of their dependent cells has changed. |
Object[] |
getInserted()
Returns the cells that were inserted. |
ParentMap |
getParentMap()
Returns the parentMap. |
Map |
getPreviousAttributes()
Returns a map that contains (object, map) pairs of the attributes that have been stored in the model. |
ConnectionSet |
getPreviousConnectionSet()
|
ParentMap |
getPreviousParentMap()
|
Object[] |
getRemoved()
Returns the cells that were inserted. |
Object |
getSource()
Returns the source of this change. |
CellView[] |
getViews(GraphLayoutCache view)
Allows a GraphLayoutCache to retrieve an array of
CellViews that was previously stored with
putViews(GraphLayoutCache, CellView[]). |
protected void |
handleEmptyGroups(Object[] groups)
Adds the groups that become empty to the cells that will be removed. |
boolean |
isSignificant()
|
void |
putViews(GraphLayoutCache view,
CellView[] views)
Allows a GraphLayoutCache to store cell views
for cells that have been removed. |
void |
redo()
Redoes a change. |
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 Object[] insert
protected Object[] changed
protected Object[] remove
protected Object[] context
protected Object[] inserted
protected Object[] removed
protected Map attributes
protected Map previousAttributes
protected ParentMap parentMap
protected ParentMap previousParentMap
protected ConnectionSet connectionSet
protected ConnectionSet previousConnectionSet
protected Map cellViews
| Constructor Detail |
public DefaultGraphModel.GraphModelEdit(Object[] inserted,
Object[] removed,
Map attributes,
ConnectionSet connectionSet,
ParentMap parentMap)
removed - a set of elements that were removedinserted - a set of roots that were inserted| Method Detail |
public Object[] filterParents(Map childCount,
int children)
protected void changeChildCount(Map childCount,
Object parent,
int change)
protected void handleEmptyGroups(Object[] groups)
public boolean isSignificant()
isSignificant in interface UndoableEditisSignificant in class CompoundEditpublic Object getSource()
getSource in interface GraphModelEvent.GraphViewChangepublic Object[] getChanged()
getChanged in interface GraphModelEvent.GraphViewChangepublic Object[] getContext()
getContext in interface GraphModelEvent.GraphViewChangepublic Object[] getInserted()
getInserted in interface GraphModelEvent.GraphModelChangepublic Object[] getRemoved()
getRemoved in interface GraphModelEvent.GraphModelChangepublic Map getPreviousAttributes()
getPreviousAttributes in interface GraphModelEvent.GraphModelChangepublic Map getAttributes()
getAttributes in interface GraphModelEvent.GraphViewChangepublic ConnectionSet getConnectionSet()
public ConnectionSet getPreviousConnectionSet()
getPreviousConnectionSet in interface GraphModelEvent.GraphModelChangepublic ParentMap getParentMap()
public ParentMap getPreviousParentMap()
getPreviousParentMap in interface GraphModelEvent.GraphModelChange
public void redo()
throws CannotRedoException
redo in interface UndoableEditredo in class CompoundEditCannotRedoException - if the change cannot be redone
public void undo()
throws CannotUndoException
undo in interface UndoableEditundo in class CompoundEditCannotUndoException - if the change cannot be undonepublic void execute()
execute in interface GraphModelEvent.ExecutableGraphChange
public void putViews(GraphLayoutCache view,
CellView[] views)
GraphModelEvent.GraphModelChangeGraphLayoutCache to store cell views
for cells that have been removed. Such cell views are used
for re-insertion and restoring the visual attributes.
putViews in interface GraphModelEvent.GraphModelChangepublic CellView[] getViews(GraphLayoutCache view)
GraphModelEvent.GraphModelChangeGraphLayoutCache to retrieve an array of
CellViews that was previously stored with
putViews(GraphLayoutCache, CellView[]).
getViews in interface GraphModelEvent.GraphModelChangepublic String toString()
toString in class CompoundEdit
|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||