edu.uci.ics.jung.visualization
Class StaticLayout

java.lang.Object
  extended by edu.uci.ics.jung.visualization.AbstractLayout
      extended by edu.uci.ics.jung.visualization.StaticLayout
All Implemented Interfaces:
ChangeEventSupport, Layout, VertexLocationFunction

public class StaticLayout
extends AbstractLayout


Field Summary
 
Fields inherited from class edu.uci.ics.jung.visualization.AbstractLayout
changeSupport, vertex_locations
 
Constructor Summary
StaticLayout(Graph g)
           
 
Method Summary
 void advancePositions()
          Implementors must override this method in order to create a Layout.
 boolean incrementsAreDone()
          If this visualization is incremental, tells whether it has stabilized at a satisfactory spot yet.
protected  void initialize_local_vertex(Vertex v)
          Initializes the local information on a single vertex.
protected  void initialize_local()
          Initializes all local information, and is called immediately within the initialize() process.
 boolean isIncremental()
          Indicates whether this visualization has an incremental mode.
 
Methods inherited from class edu.uci.ics.jung.visualization.AbstractLayout
addChangeListener, applyFilter, dontMove, fireStateChanged, forceMove, getAVertex, getBaseKey, getChangeListeners, getCoordinates, getCurrentSize, getEdge, getEdge, getGraph, getLocation, getStatus, getVertex, getVertex, getVertexIterator, getVisibleEdges, getVisibleGraph, getVisibleVertices, getX, getY, initialize, initialize, initializeLocation, initializeLocations, isLocked, lockVertex, offsetVertex, postInitialize, removeChangeListener, resize, restart, unlockVertex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticLayout

public StaticLayout(Graph g)
Method Detail

initialize_local

protected void initialize_local()
Description copied from class: AbstractLayout
Initializes all local information, and is called immediately within the initialize() process. The user is responsible for overriding this method to do any construction that may be necessary: for example, to initialize local per-edge or graph-wide data.

Overrides:
initialize_local in class AbstractLayout

initialize_local_vertex

protected void initialize_local_vertex(Vertex v)
Description copied from class: AbstractLayout
Initializes the local information on a single vertex. The user is responsible for overriding this method to do any vertex-level construction that may be necessary: for example, to attach vertex-level information to each vertex.

Specified by:
initialize_local_vertex in class AbstractLayout

advancePositions

public void advancePositions()
Description copied from class: AbstractLayout
Implementors must override this method in order to create a Layout. If the Layout is the sort that only calculates locations once, this method may be overridden with an empty method.

Note that "locked" vertices are not to be moved; however, it is the policy of the visualization to decide how to handle them, and what to do with the vertices around them. Prototypical code might include a clipping like

  for (Iterator i = getVertices().iterator(); i.hasNext() ) { Vertex v = (Vertex) i.next(); if (! dontmove.contains( v ) ) { ... // handle the node } else { // ignore the node } }
 

Specified by:
advancePositions in interface Layout
Specified by:
advancePositions in class AbstractLayout
See Also:
Layout.advancePositions()

isIncremental

public boolean isIncremental()
Description copied from interface: Layout
Indicates whether this visualization has an incremental mode. If so, it may be good to increment a bunch of times before showing. If not, the containing program may not wish to call increment.


incrementsAreDone

public boolean incrementsAreDone()
Description copied from interface: Layout
If this visualization is incremental, tells whether it has stabilized at a satisfactory spot yet.