org.jgraph.graph
public class DefaultGraphModel.GraphModelLayerEdit extends AbstractUndoableEdit implements GraphModelEvent.GraphModelChange
Field Summary | |
---|---|
static int | BACK |
protected Object[] | cells |
protected Object[] | changed |
protected Object | changeSource |
static int | FRONT |
protected int | layer |
protected int[] | next |
protected int[] | prev |
Constructor Summary | |
---|---|
GraphModelLayerEdit(Object[] cells, int layer)
Constructs a GraphModelEdit. |
Method Summary | |
---|---|
void | addImplicitEdit(UndoableEdit edit)
Allows a GraphLayoutCache to add and execute and
UndoableEdit in this change. |
void | execute()
Execute this edit such that the next invocation to this method will
invert the last execution. |
Map | getAttributes()
Returns null. |
Object[] | getChanged()
Returns the cells that have changed. |
ConnectionSet | getConnectionSet() |
Object[] | getContext()
Returns null. |
Rectangle2D | getDirtyRegion() |
Object[] | getInserted()
Returns the cells that have changed. |
protected List | getParentList(Object cell)
Returns the list that exclusively contains view . |
ParentMap | getParentMap()
Returns null. |
Map | getPreviousAttributes()
Returns null. |
ConnectionSet | getPreviousConnectionSet() |
ParentMap | getPreviousParentMap() |
Object[] | getRemoved()
Returns the cells that have changed. |
Object | getSource()
Returns the source of this change. |
CellView[] | getViews(GraphLayoutCache view)
Returns the views that have not changed explicitly, but implicitly
because one of their dependent cells has changed. |
void | putViews(GraphLayoutCache view, CellView[] cellViews)
Returns the views that have not changed explicitly, but implicitly
because one of their dependent cells has changed. |
void | redo()
Redoes a change.
|
void | setDirtyRegion(Rectangle2D dirty) |
void | undo()
Undoes a change.
|
protected void | updateListeners() |
protected void | updateNext() |
GraphLayoutCache
to add and execute and
UndoableEdit in this change. This does also work if the parent edit
has already been executed, in which case the to be added edit will be
executed immediately, after addition. This is used to handle changes
to the view that are triggered by certain changes of the model. Such
implicit edits may be associated with the view so that they may be
undone and redone correctly, and are stored in the model's global
history together with the parent event as one unit.view
.Throws: CannotRedoException if the change cannot be redone
Throws: CannotUndoException if the change cannot be undone