Package org.jgraph.event
Interface GraphLayoutCacheEvent.GraphLayoutCacheChange
-
- All Known Subinterfaces:
GraphModelEvent.GraphModelChange
- All Known Implementing Classes:
DefaultGraphModel.GraphModelEdit
,DefaultGraphModel.GraphModelLayerEdit
,GraphLayoutCache.GraphLayoutCacheEdit
- Enclosing class:
- GraphLayoutCacheEvent
public static interface GraphLayoutCacheEvent.GraphLayoutCacheChange
Defines the interface for objects that may be used to represent a change to the graph layout cache.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map
getAttributes()
Returns a map that contains (object, map) pairs which holds the new attributes for each changed cell.java.lang.Object[]
getChanged()
Returns the cells that have changed.java.lang.Object[]
getContext()
Returns the objects 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 have been inserted.java.util.Map
getPreviousAttributes()
Returns a map that contains (object, map) pairs which holds the previous attributes for the changed cells.java.lang.Object[]
getRemoved()
Returns the cells that have been removed.java.lang.Object
getSource()
Returns the source of this 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.
-
-
-
Method Detail
-
getSource
java.lang.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.- Returns:
- the source fo this change
-
getChanged
java.lang.Object[] getChanged()
Returns the cells that have changed.- Returns:
- the cell changed
-
getInserted
java.lang.Object[] getInserted()
Returns the cells that have been inserted.- Returns:
- the cells that were inserted by the change
-
getRemoved
java.lang.Object[] getRemoved()
Returns the cells that have been removed.- Returns:
- the cells that were removed by the change
-
getAttributes
java.util.Map getAttributes()
Returns a map that contains (object, map) pairs which holds the new attributes for each changed cell. Note: This returns a map of (cell, map) pairs for an insert on a model that is not an attribute store. Use getPreviousAttributes to access the attributes that have been stored in the model.
-
getPreviousAttributes
java.util.Map getPreviousAttributes()
Returns a map that contains (object, map) pairs which holds the previous attributes for the changed cells.- Returns:
- map of attributes before the change
-
getDirtyRegion
java.awt.geom.Rectangle2D getDirtyRegion()
Returns the dirty region for the original position of the changed cells before the change happened.- Returns:
- the dirty region prior to the event
-
setDirtyRegion
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. It is then up to the receiving class to set it once.- Parameters:
dirty
-
-
getContext
java.lang.Object[] getContext()
Returns the objects that have not changed explicitly, but implicitly because one of their dependent cells has changed. This is typically used to return the edges that are attached to vertices, which in turn have been resized or moved.- Returns:
- array of contextual cells
-
-