public class ObservableCachingLayout<V,E> extends LayoutDecorator<V,E> implements ChangeEventSupport, Caching, LayoutEventSupport<V,E>
LayoutDecorator| Modifier and Type | Field and Description |
|---|---|
protected ChangeEventSupport |
changeSupport |
protected com.google.common.cache.LoadingCache<V,Point2D> |
locations |
delegate| Constructor and Description |
|---|
ObservableCachingLayout(Layout<V,E> delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener l) |
void |
addLayoutChangeListener(LayoutChangeListener<V,E> listener) |
Point2D |
apply(V v) |
void |
clear()
clear cache
|
boolean |
done() |
void |
fireStateChanged() |
ChangeListener[] |
getChangeListeners()
Returns an array of all the
ChangeListeners 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 |
removeLayoutChangeListener(LayoutChangeListener<V,E> listener) |
void |
setGraph(Graph<V,E> graph) |
void |
setLocation(V v,
Point2D location)
Changes the layout coordinates of
v to location. |
void |
step()
Advances one step.
|
getDelegate, getGraph, getSize, isLocked, lock, reset, setDelegate, setInitializer, setSize, transformprotected ChangeEventSupport changeSupport
public void step()
IterativeContextstep in interface IterativeContextstep in class LayoutDecorator<V,E>public void initialize()
Layoutinitialize in interface Layout<V,E>initialize in class LayoutDecorator<V,E>public boolean done()
done in interface IterativeContextdone in class LayoutDecorator<V,E>true if this iterative process is finished, and false otherwise.public void setLocation(V v, Point2D location)
Layoutv to location.setLocation in interface Layout<V,E>setLocation in class LayoutDecorator<V,E>v - the vertex whose location is to be specifiedlocation - the coordinates of the specified locationpublic void addChangeListener(ChangeListener l)
addChangeListener in interface ChangeEventSupportpublic void removeChangeListener(ChangeListener l)
ChangeEventSupportremoveChangeListener in interface ChangeEventSupportl - the listener to be removedpublic ChangeListener[] getChangeListeners()
ChangeEventSupportChangeListeners added
with addChangeListener().getChangeListeners in interface ChangeEventSupportChangeListeners added or an empty
array if no listeners have been addedpublic void fireStateChanged()
fireStateChanged in interface ChangeEventSupportpublic void clear()
Cachingpublic void init()
Cachingpublic void addLayoutChangeListener(LayoutChangeListener<V,E> listener)
addLayoutChangeListener in interface LayoutEventSupport<V,E>public void removeLayoutChangeListener(LayoutChangeListener<V,E> listener)
removeLayoutChangeListener in interface LayoutEventSupport<V,E>Copyright © 2016. All rights reserved.