edu.uci.ics.jung.algorithms.layout
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:
- com.google.common.base.Function<V,java.awt.geom.Point2D>, Layout<V,E>
public class CircleLayout<V,E> extends AbstractLayout<V,E>
ALayoutimplementation that positions vertices equally spaced on a regular circle.
-
-
Constructor Summary
Constructors Constructor and Description CircleLayout(Graph<V,E> g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetRadius()voidinitialize()Initializes fields in the node that may not have been set during the constructor.voidreset()voidsetRadius(double radius)Sets the radius of the circle.voidsetVertexOrder(java.util.Comparator<V> comparator)Sets the order of the vertices in the layout according to the ordering specified bycomparator.voidsetVertexOrder(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
apply, getGraph, getSize, getX, getY, isLocked, lock, lock, setGraph, setInitializer, setLocation, setLocation, setSize
-
-
-
-
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.- Parameters:
radius- the radius of the circle
-
setVertexOrder
public void setVertexOrder(java.util.Comparator<V> comparator)
Sets the order of the vertices in the layout according to the ordering specified bycomparator.- Parameters:
comparator- the comparator to use to order the vertices
-
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.- Parameters:
vertex_list- a list specifying the ordering of the vertices
-
reset
public void reset()
-
initialize
public void initialize()
Description copied from interface:LayoutInitializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG