public class ObservableCachingLayout<V,E> extends LayoutDecorator<V,E> implements ChangeEventSupport, Caching
LayoutDecorator
Modifier and Type | Field and Description |
---|---|
protected ChangeEventSupport |
changeSupport |
protected Map<V,Point2D> |
locationMap |
delegate
Constructor and Description |
---|
ObservableCachingLayout(Layout<V,E> delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l) |
void |
clear()
clear cache
|
boolean |
done()
Returns true if this iterative process is finished, and false otherwise.
|
void |
fireStateChanged() |
ChangeListener[] |
getChangeListeners()
Returns an array of all the
ChangeListener s added
with addChangeListener(). |
void |
init()
ititialize resources for a cache
|
void |
initialize()
Initializes fields in the node that may not have
been set during the constructor.
|
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener.
|
void |
setGraph(Graph<V,E> graph)
setter for graph
|
void |
setLocation(V v,
Point2D location)
set the location of a vertex
|
void |
step()
Advances one step.
|
Point2D |
transform(V v) |
getDelegate, getGraph, getSize, isLocked, lock, reset, setDelegate, setInitializer, setSize
protected ChangeEventSupport changeSupport
public void step()
IterativeContext
step
in interface IterativeContext
step
in class LayoutDecorator<V,E>
edu.uci.ics.jung.algorithms.layout.Layout#step()
public void initialize()
Layout
initialize
in interface Layout<V,E>
initialize
in class LayoutDecorator<V,E>
Layout.initialize()
public boolean done()
IterativeContext
done
in interface IterativeContext
done
in class LayoutDecorator<V,E>
IterativeContext.done()
public void setLocation(V v, Point2D location)
Layout
setLocation
in interface Layout<V,E>
setLocation
in class LayoutDecorator<V,E>
v
- location
- Layout.setLocation(java.lang.Object, java.awt.geom.Point2D)
public void addChangeListener(ChangeListener l)
addChangeListener
in interface ChangeEventSupport
public void removeChangeListener(ChangeListener l)
ChangeEventSupport
removeChangeListener
in interface ChangeEventSupport
l
- the listener to be removedpublic 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 setGraph(Graph<V,E> graph)
Layout
public void clear()
Caching
public void init()
Caching
Copyright © 2014. All rights reserved.