Class CircleLayout<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
-
- edu.uci.ics.jung.algorithms.layout.CircleLayout<V,E>
-
- All Implemented Interfaces:
Layout<V,E>
,org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D>
public class CircleLayout<V,E> extends AbstractLayout<V,E>
ALayout
implementation that positions vertices equally spaced on a regular circle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
CircleLayout.CircleVertexData
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size
-
-
Constructor Summary
Constructors Constructor Description CircleLayout(edu.uci.ics.jung.graph.Graph<V,E> g)
Creates an instance for the specified graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CircleLayout.CircleVertexData
getCircleData(V v)
double
getRadius()
Returns the radius of the circle.void
initialize()
Initializes fields in the node that may not have been set during the constructor.void
reset()
void
setRadius(double radius)
Sets the radius of the circle.void
setVertexOrder(java.util.Comparator<V> comparator)
Sets the order of the vertices in the layout according to the ordering specified bycomparator
.void
setVertexOrder(java.util.List<V> vertex_list)
Sets the order of the vertices in the layout according to the ordering ofvertex_list
.-
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
-
-
-
-
Method Detail
-
getRadius
public double getRadius()
Returns the radius of the circle.
-
setRadius
public void setRadius(double radius)
Sets the radius of the circle. Must be called beforeinitialize()
is called.
-
setVertexOrder
public void setVertexOrder(java.util.Comparator<V> comparator)
Sets the order of the vertices in the layout according to the ordering specified bycomparator
.
-
setVertexOrder
public void setVertexOrder(java.util.List<V> vertex_list)
Sets the order of the vertices in the layout according to the ordering ofvertex_list
.
-
reset
public void reset()
-
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.
-
getCircleData
protected CircleLayout.CircleVertexData getCircleData(V v)
-
-