public class GraphLayoutCache.GraphLayoutCacheEdit extends javax.swing.undo.CompoundEdit implements GraphLayoutCacheEvent.GraphLayoutCacheChange
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
attributes |
protected java.lang.Object[] |
cells |
protected java.util.Set |
changedCells |
protected CellView[] |
context |
protected java.awt.geom.Rectangle2D |
dirtyRegion
The dirty region associated with this event prior to the change
|
protected CellView[] |
hidden |
protected java.lang.Object[] |
invisible |
protected java.util.Map |
previousAttributes |
protected java.lang.Object[] |
previousCells |
protected java.lang.Object[] |
visible |
Constructor and Description |
---|
GraphLayoutCacheEdit(java.util.Map nested)
Constructs a GraphViewEdit.
|
GraphLayoutCacheEdit(java.lang.Object[] inserted,
java.util.Map attributes,
java.lang.Object[] visible,
java.lang.Object[] invisible)
Constructs a GraphViewEdit.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute this edit such that the next invocation to this method will
invert the last execution.
|
java.util.Map |
getAttributes()
Returns a map of (cell view, attribute) pairs.
|
java.lang.Object[] |
getChanged()
Returns the cell views that have changed.
|
java.lang.Object[] |
getContext()
Returns the views that have not changed explicitly, but implicitly
because one of their dependent cells has changed.
|
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 habe been made visible.
|
java.util.Map |
getPreviousAttributes()
Returns a map of (cell view, attribute) pairs.
|
java.lang.Object[] |
getRemoved()
Returns the cells that have changed.
|
java.lang.Object |
getSource()
Returns the source of this change.
|
boolean |
isSignificant() |
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 java.lang.Object[] cells
protected java.lang.Object[] previousCells
protected CellView[] context
protected CellView[] hidden
protected java.util.Map attributes
protected java.util.Map previousAttributes
protected java.lang.Object[] visible
protected java.lang.Object[] invisible
protected java.awt.geom.Rectangle2D dirtyRegion
protected java.util.Set changedCells
public GraphLayoutCacheEdit(java.util.Map nested)
nested
- the map that defines the new attributespublic GraphLayoutCacheEdit(java.lang.Object[] inserted, java.util.Map attributes, java.lang.Object[] visible, java.lang.Object[] invisible)
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 invisiblepublic java.lang.Object getSource()
GraphLayoutCacheEvent.GraphLayoutCacheChange
getSource
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public boolean isSignificant()
isSignificant
in interface javax.swing.undo.UndoableEdit
isSignificant
in class javax.swing.undo.CompoundEdit
public java.lang.Object[] getChanged()
getChanged
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public java.lang.Object[] getInserted()
getInserted
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public java.lang.Object[] getRemoved()
getRemoved
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public java.lang.Object[] getContext()
getContext
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public java.util.Map getAttributes()
getAttributes
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public java.util.Map getPreviousAttributes()
getPreviousAttributes
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public java.awt.geom.Rectangle2D getDirtyRegion()
GraphLayoutCacheEvent.GraphLayoutCacheChange
getDirtyRegion
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public void setDirtyRegion(java.awt.geom.Rectangle2D dirty)
GraphLayoutCacheEvent.GraphLayoutCacheChange
setDirtyRegion
in interface GraphLayoutCacheEvent.GraphLayoutCacheChange
public void redo() throws javax.swing.undo.CannotRedoException
redo
in interface javax.swing.undo.UndoableEdit
redo
in class javax.swing.undo.CompoundEdit
javax.swing.undo.CannotRedoException
- if the change cannot be redonepublic void undo() throws javax.swing.undo.CannotUndoException
undo
in interface javax.swing.undo.UndoableEdit
undo
in class javax.swing.undo.CompoundEdit
javax.swing.undo.CannotUndoException
- if the change cannot be undonepublic void execute()
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.