JGraph | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
AbstractUndoableEdit
org.jgraph.graph.DefaultGraphModel.GraphModelLayerEdit
public class DefaultGraphModel.GraphModelLayerEdit
extends AbstractUndoableEdit
implements GraphModelEvent.GraphModelChange
Field Summary | |
static int | |
static int | |
protected Object[] | |
protected Object | |
protected Object[] | |
protected int | |
protected int[] | |
protected int[] |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
Map |
|
Object[] |
|
ConnectionSet |
|
Object[] |
|
Object[] |
|
protected List |
|
ParentMap |
|
Map |
|
ConnectionSet |
|
ParentMap |
|
Object[] |
|
Object |
|
CellView[] |
|
void |
|
void |
|
void |
|
protected void | |
protected void |
public static final int BACK
- Field Value:
- -2
public static final int FRONT
- Field Value:
- -1
protected Object[] cells
protected Object changeSource
protected Object[] changed
protected int layer
protected int[] next
protected int[] prev
public GraphModelLayerEdit(Object[] cells, int layer)
Constructs a GraphModelEdit. This modifies the order of the cells in the model.
public void addImplicitEdit(UndoableEdit edit)
Allows aGraphLayoutCache
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 void execute()
Execute this edit such that the next invocation to this method will invert the last execution.
public Map getAttributes()
Returns null.
- Specified by:
- getAttributes in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object[] getChanged()
Returns the cells that have changed.
- Specified by:
- getChanged in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public ConnectionSet getConnectionSet()
Returns a connection set representing the graph structure after the change was applied
- Specified by:
- getConnectionSet in interface GraphModelEvent.GraphModelChange
- Returns:
- the connection set of the graph after the change
public Object[] getContext()
Returns null.
- Specified by:
- getContext in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object[] getInserted()
Returns the cells that have changed.
- Specified by:
- getInserted in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
protected List getParentList(Object cell)
Returns the list that exclusively containsview
.
public ParentMap getParentMap()
Returns null.
- Specified by:
- getParentMap in interface GraphModelEvent.GraphModelChange
public Map getPreviousAttributes()
Returns null.
- Specified by:
- getPreviousAttributes in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public ConnectionSet getPreviousConnectionSet()
Returns a connection set representing the graph structure before the change was applied ( an "undo" of the change).
- Specified by:
- getPreviousConnectionSet in interface GraphModelEvent.GraphModelChange
- Returns:
- the connection set of the graph before the change
public ParentMap getPreviousParentMap()
Returns a parent map representing the group structure before the change was applied ( an "undo" of the change )
- Specified by:
- getPreviousParentMap in interface GraphModelEvent.GraphModelChange
- Returns:
- the previous parent map
public Object[] getRemoved()
Returns the cells that have changed.
- Specified by:
- getRemoved in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public Object getSource()
Returns the source of this change. This can either be a view or a model, if this change is a GraphModelChange.
- Specified by:
- getSource in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public CellView[] getViews(GraphLayoutCache view)
Returns the views that have not changed explicitly, but implicitly because one of their dependent cells has changed.
- Specified by:
- getViews in interface GraphModelEvent.GraphModelChange
public void putViews(GraphLayoutCache view, CellView[] cellViews)
Returns the views that have not changed explicitly, but implicitly because one of their dependent cells has changed.
- Specified by:
- putViews in interface GraphModelEvent.GraphModelChange
public void redo() throws CannotRedoException
Redoes a change.
public void undo() throws CannotUndoException
Undoes a change.
protected void updateListeners()
protected void updateNext()