org.jgraph.graph
Class GraphLayoutCache.GraphLayoutCacheEdit
CompoundEdit
org.jgraph.graph.GraphLayoutCache.GraphLayoutCacheEdit
- GraphLayoutCache
- GraphLayoutCacheEvent.GraphLayoutCacheChange
public class GraphLayoutCache.GraphLayoutCacheEdit
extends CompoundEdit
An implementation of GraphViewChange.
void | execute() - Execute this edit such that the next invocation to this method will
invert the last execution.
|
Map | getAttributes() - Returns a map of (cell view, attribute) pairs.
|
Object[] | getChanged() - Returns the cell views that have changed.
|
Object[] | getContext() - Returns the views that have not changed explicitly, but implicitly
because one of their dependent cells has changed.
|
Object[] | getInserted() - Returns the cells that habe been made visible.
|
Map | getPreviousAttributes() - Returns a map of (cell view, attribute) pairs.
|
Object[] | getRemoved() - Returns the cells that have changed.
|
Object | getSource() - Returns the source of this change.
|
boolean | isSignificant()
|
void | redo() - Redoes a change.
|
void | undo() - Undoes a change.
|
attributes
protected Map attributes
cells
protected Object[] cells
changedCells
protected Set changedCells
invisible
protected Object[] invisible
previousAttributes
protected Map previousAttributes
previousCells
protected Object[] previousCells
visible
protected Object[] visible
GraphLayoutCacheEdit
public GraphLayoutCacheEdit(Map nested)
Constructs a GraphViewEdit. This modifies the attributes of the
specified views and may be used to notify UndoListeners.
nested
- the map that defines the new attributes
GraphLayoutCacheEdit
public GraphLayoutCacheEdit(Object[] inserted,
Map attributes,
Object[] visible,
Object[] invisible)
Constructs a GraphViewEdit. This modifies the attributes of the
specified views and may be used to notify UndoListeners. This should
also take an array of removed cell views, but it is not possible to
add further UndoableEdits to an already executed CompoundEdit, such
as a GraphModel change. Thus, to handle implicit changes -- rather
than piggybacking on the model's event -- the CompoundEdit's addEdit
method should be extended to accept and instantly execute sub-
sequent edits (implicit changes to the view, such as removing a
mapping, hiding a view or the like).
inserted
- an array of inserted cellsattributes
- the map that defines the new attributesvisible
- an array defining which cells are visibleinvisible
- an array defining which cells are invisible
execute
public void execute()
Execute this edit such that the next invocation to this method will
invert the last execution.
getSource
public Object getSource()
Returns the source of this change. This can either be a view or a
model, if this change is a GraphModelChange. Note: This is not
necessarily the same as the source of the event and is used
separately in the graphundomanager.
- getSource in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
- the source fo this change
isSignificant
public boolean isSignificant()
redo
public void redo()
throws CannotRedoException
Redoes a change.
undo
public void undo()
throws CannotUndoException
Undoes a change.
Copyright (C) 2001-2006 Gaudenz Alder. All rights reserved.