edu.uci.ics.jung.algorithms.layout
Class StaticLayout<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
      extended by edu.uci.ics.jung.algorithms.layout.StaticLayout<V,E>
Type Parameters:
V -
E -
All Implemented Interfaces:
Layout<V,E>, org.apache.commons.collections15.Transformer<V,Point2D>

public class StaticLayout<V,E>
extends AbstractLayout<V,E>

StaticLayout places the vertices in the locations specified by its Transformer initializer. Vertex locations can be placed in a Map and then supplied to this layout as follows: Transformer vertexLocations = TransformerUtils.mapTransformer(map);

Author:
Tom Nelson - tomnelson@dev.java.net

Field Summary
 
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size
 
Constructor Summary
StaticLayout(Graph<V,E> graph)
          Creates an instance for the specified graph and default size; vertex locations are randomly assigned.
StaticLayout(Graph<V,E> graph, Dimension size)
          Creates an instance for the specified graph and size.
StaticLayout(Graph<V,E> graph, org.apache.commons.collections15.Transformer<V,Point2D> initializer)
          Creates an instance for the specified graph and locations, with default size.
StaticLayout(Graph<V,E> graph, org.apache.commons.collections15.Transformer<V,Point2D> initializer, Dimension size)
          Creates an instance for the specified graph, locations, and size.
 
Method Summary
 void initialize()
          Initializes fields in the node that may not have been set during the constructor.
 void reset()
           
 
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, setSize, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticLayout

public StaticLayout(Graph<V,E> graph,
                    org.apache.commons.collections15.Transformer<V,Point2D> initializer,
                    Dimension size)
Creates an instance for the specified graph, locations, and size.


StaticLayout

public StaticLayout(Graph<V,E> graph,
                    org.apache.commons.collections15.Transformer<V,Point2D> initializer)
Creates an instance for the specified graph and locations, with default size.


StaticLayout

public StaticLayout(Graph<V,E> graph)
Creates an instance for the specified graph and default size; vertex locations are randomly assigned.


StaticLayout

public StaticLayout(Graph<V,E> graph,
                    Dimension size)
Creates an instance for the specified graph and size.

Method Detail

initialize

public void initialize()
Description copied from interface: Layout
Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.


reset

public void reset()


Copyright © 2009. All Rights Reserved.