Class StaticLayout<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
-
- edu.uci.ics.jung.algorithms.layout.StaticLayout<V,E>
-
- Type Parameters:
V
-E
-
- All Implemented Interfaces:
Layout<V,E>
,org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D>
public class StaticLayout<V,E> extends AbstractLayout<V,E>
StaticLayout places the vertices in the locations specified by its Transformerinitializer. Vertex locations can be placed in a Map and then supplied to this layout as follows: Transformer
vertexLocations = TransformerUtils.mapTransformer(map);
-
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size
-
-
Constructor Summary
Constructors Constructor Description StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph)
Creates an instance for the specified graph and default size; vertex locations are randomly assigned.StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph, java.awt.Dimension size)
Creates an instance for the specified graph and size.StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph, org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D> initializer)
Creates an instance for the specified graph and locations, with default size.StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph, org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D> initializer, java.awt.Dimension size)
Creates an instance for the specified graph, locations, and size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
StaticLayout
public StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph, org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D> initializer, java.awt.Dimension size)
Creates an instance for the specified graph, locations, and size.
-
StaticLayout
public StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph, org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D> initializer)
Creates an instance for the specified graph and locations, with default size.
-
StaticLayout
public StaticLayout(edu.uci.ics.jung.graph.Graph<V,E> graph)
Creates an instance for the specified graph and default size; vertex locations are randomly assigned.
-
-
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()
-
-