edu.uci.ics.jung.algorithms.layout
Class SpringLayout2<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
-
- edu.uci.ics.jung.algorithms.layout.SpringLayout<V,E>
-
- edu.uci.ics.jung.algorithms.layout.SpringLayout2<V,E>
-
- All Implemented Interfaces:
- com.google.common.base.Function<V,java.awt.geom.Point2D>, Layout<V,E>, IterativeContext
public class SpringLayout2<V,E> extends SpringLayout<V,E>
The SpringLayout package represents a visualization of a set of nodes. The SpringLayout, which is initialized with a Graph, assigns X/Y locations to each node. When calledrelax(), the SpringLayout moves the visualization forward one step.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uci.ics.jung.algorithms.layout.SpringLayout
SpringLayout.SpringDimensionChecker
-
-
Constructor Summary
Constructors Constructor and Description SpringLayout2(Graph<V,E> g)Constructor for a SpringLayout for a raw graph with associated dimension--the input knows how big the graph is.SpringLayout2(Graph<V,E> g, com.google.common.base.Function<E,java.lang.Integer> length_function)Constructor for a SpringLayout for a raw graph with associated component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleandone()voidstep()Relaxation step.-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.SpringLayout
getForceMultiplier, getRepulsionRange, getStretch, initialize, isIncremental, reset, setForceMultiplier, setRepulsionRange, setSize, setStretch
-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
apply, getGraph, getSize, getX, getY, isLocked, lock, lock, setGraph, setInitializer, setLocation, setLocation
-
-
-
-
Constructor Detail
-
SpringLayout2
public SpringLayout2(Graph<V,E> g)
Constructor for a SpringLayout for a raw graph with associated dimension--the input knows how big the graph is. Defaults to the unit length function.- Parameters:
g- the graph on which the layout algorithm is to operate
-
-
Method Detail
-
step
public void step()
Relaxation step. Moves all nodes a smidge.- Specified by:
stepin interfaceIterativeContext- Overrides:
stepin classSpringLayout<V,E>
-
done
public boolean done()
- Specified by:
donein interfaceIterativeContext- Overrides:
donein classSpringLayout<V,E>- Returns:
- false
-
-
DataMelt 3.0 © DataMelt by jWork.ORG