org.jgraph.graph
public class DefaultGraphModel.GraphModelEdit extends CompoundEdit implements GraphModelEvent.GraphModelChange
| Field Summary | |
|---|---|
| protected Map | attributes |
| protected Map | cellViews |
| protected Object[] | changed |
| protected ConnectionSet | connectionSet |
| protected Object[] | context |
| protected Rectangle2D | dirtyRegion The dirty region of the change prior to it happening |
| protected Object[] | insert |
| protected Object[] | inserted |
| protected ParentMap | parentMap |
| protected Map | previousAttributes |
| protected ConnectionSet | previousConnectionSet |
| protected ParentMap | previousParentMap |
| protected Object[] | remove |
| protected Object[] | removed |
| Constructor Summary | |
|---|---|
| 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. |
| Rectangle2D | getDirtyRegion() |
| 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) |
| 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) |
| void | redo()
Redoes a change.
|
| void | setDirtyRegion(Rectangle2D dirty) |
| String | toString() |
| void | undo()
Undoes a change.
|
Parameters: inserted a set of roots that were inserted removed a set of elements that were removed attributes the attribute changes made by the edit connectionSet the set of changed connections parentMap the map of changed parents
Returns: ConnectionSet
Returns: ParentMap
Throws: CannotRedoException if the change cannot be redone
Throws: CannotUndoException if the change cannot be undone