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,,Point2D> Layout<V,,E> Function<V,Point2D>
A
Layout implementation that positions vertices equally spaced on a regular circle.- Author:
- Masanori Harada
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.common.cache.LoadingCache<V, CircleLayout.CircleVertexData> Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CircleLayout.CircleVertexDatagetCircleData(V v) doublevoidInitializes fields in the node that may not have been set during the constructor.voidreset()voidsetRadius(double radius) Sets the radius of the circle.voidsetVertexOrder(Comparator<V> comparator) Sets the order of the vertices in the layout according to the ordering specified bycomparator.voidsetVertexOrder(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, offsetVertex, setGraph, setInitializer, setLocation, setLocation, setSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
circleVertexDatas
-
-
Constructor Details
-
CircleLayout
-
-
Method Details
-
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
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
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. -
getCircleData
-