public class PersistentLayoutImpl<V,E> extends ObservableCachingLayout<V,E> implements PersistentLayout<V,E>, ChangeEventSupport, Caching
| Modifier and Type | Class and Description |
|---|---|
static class |
PersistentLayoutImpl.RandomPointFactory |
PersistentLayout.Point| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<V> |
dontmove
a collection of Vertices that should not move
|
protected boolean |
locked
whether the graph is locked (stops the VisualizationViewer rendering thread)
|
protected java.util.Map<V,PersistentLayout.Point> |
map
a container for Vertices
|
changeSupport, locationMap| Constructor and Description |
|---|
PersistentLayoutImpl(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout)
create an instance with a passed layout
create containers for graph components
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
done() |
protected void |
initializeLocation(V v,
java.awt.geom.Point2D coord,
java.awt.Dimension d)
Sets persisted location for a vertex within the dimensions of the space.
|
protected void |
initializeLocations()
This method calls initialize_local_vertex for each vertex, and
also adds initial coordinate information for each vertex.
|
void |
lock(boolean locked) |
void |
lock(V v,
boolean state) |
void |
persist(java.lang.String fileName)
save the Vertex locations to a file
|
void |
restore(java.lang.String fileName)
Restore the graph Vertex locations from a file
|
addChangeListener, clear, fireStateChanged, getChangeListeners, init, initialize, removeChangeListener, setGraph, setLocation, step, transformgetDelegate, getGraph, getSize, isLocked, reset, setDelegate, setInitializer, setSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGraph, getSize, initialize, isLocked, reset, setGraph, setInitializer, setLocation, setSizeaddChangeListener, fireStateChanged, getChangeListeners, removeChangeListenerprotected java.util.Map<V,PersistentLayout.Point> map
protected java.util.Set<V> dontmove
protected boolean locked
protected void initializeLocations()
protected void initializeLocation(V v, java.awt.geom.Point2D coord, java.awt.Dimension d)
v - coord - d - public void persist(java.lang.String fileName)
throws java.io.IOException
persist in interface PersistentLayout<V,E>fileName - the file to save toan - IOException if the file cannot be usedjava.io.IOExceptionpublic void restore(java.lang.String fileName)
throws java.io.IOException,
java.lang.ClassNotFoundException
restore in interface PersistentLayout<V,E>fileName - the file to usejava.io.IOException - for file problemsjava.lang.ClassNotFoundException - for classpath problemspublic void lock(boolean locked)
lock in interface PersistentLayout<V,E>public boolean done()
done in interface edu.uci.ics.jung.algorithms.util.IterativeContextdone in class ObservableCachingLayout<V,E>IterativeContext.done()