| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.algorithms.layout.LayoutDecorator<V,E>
edu.uci.ics.jung.visualization.layout.ObservableCachingLayout<V,E>
edu.uci.ics.jung.visualization.layout.PersistentLayoutImpl<V,E>
public class PersistentLayoutImpl<V,E>
Implementation of PersistentLayout. Defers to another layout until 'restore' is called, then it uses the saved vertex locations
| Nested Class Summary | |
|---|---|
static class | 
PersistentLayoutImpl.RandomPointFactory
 | 
| Nested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.layout.PersistentLayout | 
|---|
PersistentLayout.Point | 
| Field Summary | |
|---|---|
protected  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  Map<V,PersistentLayout.Point> | 
map
a container for Vertices  | 
| Fields inherited from class edu.uci.ics.jung.visualization.layout.ObservableCachingLayout | 
|---|
changeSupport, locationMap | 
| Fields inherited from class edu.uci.ics.jung.algorithms.layout.LayoutDecorator | 
|---|
delegate | 
| Constructor Summary | |
|---|---|
PersistentLayoutImpl(Layout<V,E> layout)
create an instance with a passed layout create containers for graph components  | 
|
| Method Summary | |
|---|---|
 boolean | 
done()
Returns true if this iterative process is finished, and false otherwise.  | 
protected  void | 
initializeLocation(V v,
                   Point2D coord,
                   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)
Sets a flag which fixes this vertex in place.  | 
 void | 
persist(String fileName)
save the Vertex locations to a file  | 
 void | 
restore(String fileName)
Restore the graph Vertex locations from a file  | 
| Methods inherited from class edu.uci.ics.jung.visualization.layout.ObservableCachingLayout | 
|---|
addChangeListener, clear, fireStateChanged, getChangeListeners, init, initialize, removeChangeListener, setGraph, setLocation, step, transform | 
| Methods inherited from class edu.uci.ics.jung.algorithms.layout.LayoutDecorator | 
|---|
getDelegate, getGraph, getSize, isLocked, reset, setDelegate, setInitializer, setSize | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface edu.uci.ics.jung.algorithms.layout.Layout | 
|---|
getGraph, getSize, initialize, isLocked, reset, setGraph, setInitializer, setLocation, setSize | 
| Methods inherited from interface edu.uci.ics.jung.visualization.util.ChangeEventSupport | 
|---|
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener | 
| Methods inherited from interface edu.uci.ics.jung.visualization.util.Caching | 
|---|
clear, init | 
| Field Detail | 
|---|
protected Map<V,PersistentLayout.Point> map
protected Set<V> dontmove
protected boolean locked
| Constructor Detail | 
|---|
public PersistentLayoutImpl(Layout<V,E> layout)
layout - | Method Detail | 
|---|
protected void initializeLocations()
protected void initializeLocation(V v,
                                  Point2D coord,
                                  Dimension d)
v - coord - d - 
public void persist(String fileName)
             throws IOException
persist in interface PersistentLayout<V,E>fileName - the file to save to
an - IOException if the file cannot be used
IOException
public void restore(String fileName)
             throws IOException,
                    ClassNotFoundException
restore in interface PersistentLayout<V,E>fileName - the file to use
IOException - for file problems
ClassNotFoundException - for classpath problemspublic void lock(boolean locked)
lock in interface PersistentLayout<V,E>public boolean done()
IterativeContext
done in interface IterativeContextdone in class ObservableCachingLayout<V,E>IterativeContext.done()
public void lock(V v,
                 boolean state)
Layout
lock in interface Layout<V,E>lock in class LayoutDecorator<V,E>v - vertexLayout.lock(Object, boolean)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||