public class DefaultGraphModel.GraphModelLayerEdit extends javax.swing.undo.AbstractUndoableEdit implements GraphModelEvent.GraphModelChange
| Modifier and Type | Field and Description |
|---|---|
static int |
BACK |
protected java.lang.Object[] |
cells |
protected java.lang.Object[] |
changed |
protected java.lang.Object |
changeSource |
static int |
FRONT |
protected int |
layer |
protected int[] |
next |
protected int[] |
prev |
| Constructor and Description |
|---|
DefaultGraphModel.GraphModelLayerEdit(java.lang.Object[] cells,
int layer)
Constructs a GraphModelEdit.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImplicitEdit(javax.swing.undo.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.
|
java.util.Map |
getAttributes()
Returns null.
|
java.lang.Object[] |
getChanged()
Returns the cells that have changed.
|
ConnectionSet |
getConnectionSet()
Returns a connection set representing the graph structure after the
change was applied
|
java.lang.Object[] |
getContext()
Returns null.
|
java.awt.geom.Rectangle2D |
getDirtyRegion()
Returns the dirty region for the original position of the
changed cells before the change happened.
|
java.lang.Object[] |
getInserted()
Returns the cells that have changed.
|
protected java.util.List |
getParentList(java.lang.Object cell)
Returns the list that exclusively contains
view. |
ParentMap |
getParentMap()
Returns null.
|
java.util.Map |
getPreviousAttributes()
Returns null.
|
ConnectionSet |
getPreviousConnectionSet()
Returns a connection set representing the graph structure before the
change was applied ( an "undo" of the change).
|
ParentMap |
getPreviousParentMap()
Returns a parent map representing the group structure before the
change was applied ( an "undo" of the change )
|
java.lang.Object[] |
getRemoved()
Returns the cells that have changed.
|
java.lang.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(java.awt.geom.Rectangle2D dirty)
In some cases the class firing this event will not have access
to the dirty region prior to the change.
|
void |
undo()
Undoes a change.
|
protected void |
updateListeners() |
protected void |
updateNext() |
public static final int FRONT
public static final int BACK
protected java.lang.Object changeSource
protected transient java.lang.Object[] cells
protected transient int[] next
protected transient int[] prev
protected int layer
protected java.lang.Object[] changed
public DefaultGraphModel.GraphModelLayerEdit(java.lang.Object[] cells,
int layer)
protected void updateNext()
public java.lang.Object getSource()
getSource in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic java.lang.Object[] getChanged()
getChanged in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic java.lang.Object[] getInserted()
getInserted in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic java.lang.Object[] getRemoved()
getRemoved in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic java.lang.Object[] getContext()
getContext in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic java.util.Map getAttributes()
getAttributes in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic java.util.Map getPreviousAttributes()
getPreviousAttributes in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic ConnectionSet getConnectionSet()
GraphModelEvent.GraphModelChangegetConnectionSet in interface GraphModelEvent.GraphModelChangepublic ConnectionSet getPreviousConnectionSet()
GraphModelEvent.GraphModelChangegetPreviousConnectionSet in interface GraphModelEvent.GraphModelChangepublic ParentMap getParentMap()
getParentMap in interface GraphModelEvent.GraphModelChangepublic ParentMap getPreviousParentMap()
GraphModelEvent.GraphModelChangegetPreviousParentMap in interface GraphModelEvent.GraphModelChangepublic java.awt.geom.Rectangle2D getDirtyRegion()
GraphLayoutCacheEvent.GraphLayoutCacheChangegetDirtyRegion in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic void setDirtyRegion(java.awt.geom.Rectangle2D dirty)
GraphLayoutCacheEvent.GraphLayoutCacheChangesetDirtyRegion in interface GraphLayoutCacheEvent.GraphLayoutCacheChangepublic void addImplicitEdit(javax.swing.undo.UndoableEdit edit)
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.public CellView[] getViews(GraphLayoutCache view)
getViews in interface GraphModelEvent.GraphModelChangeview - the GraphLayoutCache whose stored cells are
to be retrievedpublic void putViews(GraphLayoutCache view, CellView[] cellViews)
putViews in interface GraphModelEvent.GraphModelChangeview - the GraphLayoutCache to store the removed
cellscellViews - the cell views to be storedpublic void redo()
throws javax.swing.undo.CannotRedoException
redo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.AbstractUndoableEditjavax.swing.undo.CannotRedoException - if the change cannot be redonepublic void undo()
throws javax.swing.undo.CannotUndoException
undo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.AbstractUndoableEditjavax.swing.undo.CannotUndoException - if the change cannot be undonepublic void execute()
protected void updateListeners()
protected java.util.List getParentList(java.lang.Object cell)
view.Copyright (C) 2001-2008 Gaudenz Alder. All rights reserved.