JGraph
v5.12.2.1


org.jgraph.event
Interface GraphLayoutCacheEvent.GraphLayoutCacheChange

All Known Subinterfaces:
GraphModelEvent.GraphModelChange
All Known Implementing Classes:
DefaultGraphModel.GraphModelEdit, DefaultGraphModel.GraphModelLayerEdit, GraphLayoutCache.GraphLayoutCacheEdit
Enclosing interface:
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
 Map getAttributes()
          Returns a map that contains (object, map) pairs which holds the new attributes for each changed cell.
 Object[] getChanged()
          Returns the cells that have changed.
 Object[] getContext()
          Returns the objects that have not changed explicitly, but implicitly because one of their dependent cells has changed.
 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 been inserted.
 Map getPreviousAttributes()
          Returns a map that contains (object, map) pairs which holds the previous attributes for the changed cells.
 Object[] getRemoved()
          Returns the cells that have been removed.
 Object getSource()
          Returns the source of this 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.
 

Method Detail

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.

Returns:
the source fo this change

getChanged

public Object[] getChanged()
Returns the cells that have changed.

Returns:
the cell changed

getInserted

public Object[] getInserted()
Returns the cells that have been inserted.

Returns:
the cells that were inserted by the change

getRemoved

public Object[] getRemoved()
Returns the cells that have been removed.

Returns:
the cells that were removed by the change

getAttributes

public 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

public 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

public 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

public void setDirtyRegion(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

public 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

JGraph
v5.12.2.1


Copyright (C) 2001-2008 Gaudenz Alder. All rights reserved.