org.jgraph.graph
Class DefaultGraphModel.GraphModelEdit
CompoundEdit
org.jgraph.graph.DefaultGraphModel.GraphModelEdit
- DefaultGraphModel
- GraphLayoutCacheEvent.GraphLayoutCacheChange, GraphModelEvent.GraphModelChange
public class DefaultGraphModel.GraphModelEdit
extends CompoundEdit
An implementation of GraphModelChange that can be added to the model
event.
attributes
protected Map attributes
cellViews
protected Map cellViews
changed
protected Object[] changed
context
protected Object[] context
insert
protected Object[] insert
inserted
protected Object[] inserted
previousAttributes
protected Map previousAttributes
previousConnectionSet
protected ConnectionSet previousConnectionSet
previousParentMap
protected ParentMap previousParentMap
remove
protected Object[] remove
removed
protected Object[] removed
GraphModelEdit
public GraphModelEdit(Object[] inserted,
Object[] removed,
Map attributes,
ConnectionSet connectionSet,
ParentMap parentMap)
Constructs an edit record.
inserted
- a set of roots that were insertedremoved
- a set of elements that were removedattributes
- the attribute changes made by the editconnectionSet
- the set of changed connectionsparentMap
- the map of changed parents
changeChildCount
protected void changeChildCount(Map childCount,
Object parent,
int change)
execute
public void execute()
Execute this edit such that the next invocation to this method will
invert the last execution.
filterParents
public Object[] filterParents(Map childCount,
int children)
getChanged
public Object[] getChanged()
Returns the cells that have changed. This includes the cells that
have been changed through a call to getAttributes and the edges that
have been changed with the ConnectionSet.
- getChanged in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
handleEmptyGroups
protected void handleEmptyGroups(Object[] groups)
Adds the groups that become empty to the cells that will be removed.
(Auto remove empty cells.) Removed cells will be re-inserted on undo,
and the parent- child relations will be restored.
isSignificant
public boolean isSignificant()
redo
public void redo()
throws CannotRedoException
Redoes a change.
toString
public String toString()
undo
public void undo()
throws CannotUndoException
Undoes a change.
Copyright (C) 2001-2006 Gaudenz Alder. All rights reserved.