|
JGraph |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
org.jgraph.graph.DefaultGraphModel.GraphModelLayerEdit
An implementation of GraphViewChange.
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
|
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
Constructor Summary | |
DefaultGraphModel.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()
Returns a connection set representing the graph structure after the change was applied |
Object[] |
getContext()
Returns null. |
Rectangle2D |
getDirtyRegion()
Returns the dirty region for the original position of the changed cells before the change happened. |
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()
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 ) |
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)
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()
|
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FRONT
public static final int BACK
protected Object changeSource
protected transient Object[] cells
protected transient int[] next
protected transient int[] prev
protected int layer
protected Object[] changed
Constructor Detail |
public DefaultGraphModel.GraphModelLayerEdit(Object[] cells, int layer)
Method Detail |
protected void updateNext()
public Object getSource()
getSource
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object[] getChanged()
getChanged
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object[] getInserted()
getInserted
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object[] getRemoved()
getRemoved
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object[] getContext()
getContext
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Map getAttributes()
getAttributes
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Map getPreviousAttributes()
getPreviousAttributes
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public ConnectionSet getConnectionSet()
GraphModelEvent.GraphModelChange
getConnectionSet
in interface GraphModelEvent.GraphModelChange
public ConnectionSet getPreviousConnectionSet()
GraphModelEvent.GraphModelChange
getPreviousConnectionSet
in interface GraphModelEvent.GraphModelChange
public ParentMap getParentMap()
getParentMap
in interface GraphModelEvent.GraphModelChange
public ParentMap getPreviousParentMap()
GraphModelEvent.GraphModelChange
getPreviousParentMap
in interface GraphModelEvent.GraphModelChange
public Rectangle2D getDirtyRegion()
GraphLayoutCacheEvent.GraphLayoutCacheChange
getDirtyRegion
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public void setDirtyRegion(Rectangle2D dirty)
GraphLayoutCacheEvent.GraphLayoutCacheChange
setDirtyRegion
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
dirty
- public void addImplicitEdit(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.GraphModelChange
view
- the GraphLayoutCache
whose stored cells are
to be retrievedpublic void putViews(GraphLayoutCache view, CellView[] cellViews)
putViews
in interface GraphModelEvent.GraphModelChange
view
- the GraphLayoutCache
to store the removed
cellscellViews
- the cell views to be storedpublic void redo() throws CannotRedoException
redo
in interface UndoableEdit
CannotRedoException
- if the change cannot be redonepublic void undo() throws CannotUndoException
undo
in interface UndoableEdit
CannotUndoException
- if the change cannot be undonepublic void execute()
protected void updateListeners()
protected List getParentList(Object cell)
view
.
|
JGraph |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |