public class ObservableCachingLayout<V,E> extends edu.uci.ics.jung.algorithms.layout.LayoutDecorator<V,E> implements ChangeEventSupport, Caching
LayoutDecorator
Modifier and Type | Field and Description |
---|---|
protected ChangeEventSupport |
changeSupport |
protected java.util.Map<V,java.awt.geom.Point2D> |
locationMap |
Constructor and Description |
---|
ObservableCachingLayout(edu.uci.ics.jung.algorithms.layout.Layout<V,E> delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l) |
void |
clear()
clear cache
|
boolean |
done() |
void |
fireStateChanged() |
javax.swing.event.ChangeListener[] |
getChangeListeners()
Returns an array of all the
ChangeListener s added
with addChangeListener(). |
void |
init()
ititialize resources for a cache
|
void |
initialize() |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener.
|
void |
setGraph(edu.uci.ics.jung.graph.Graph<V,E> graph) |
void |
setLocation(V v,
java.awt.geom.Point2D location) |
void |
step() |
java.awt.geom.Point2D |
transform(V v) |
protected ChangeEventSupport changeSupport
protected java.util.Map<V,java.awt.geom.Point2D> locationMap
public void step()
public void initialize()
public boolean done()
public void setLocation(V v, java.awt.geom.Point2D location)
public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener
in interface ChangeEventSupport
public void removeChangeListener(javax.swing.event.ChangeListener l)
ChangeEventSupport
removeChangeListener
in interface ChangeEventSupport
l
- the listener to be removedpublic javax.swing.event.ChangeListener[] getChangeListeners()
ChangeEventSupport
ChangeListener
s added
with addChangeListener().getChangeListeners
in interface ChangeEventSupport
ChangeListener
s added or an empty
array if no listeners have been addedpublic void fireStateChanged()
fireStateChanged
in interface ChangeEventSupport
public void clear()
Caching
public void init()
Caching