public class CircleLayout<V,E> extends AbstractLayout<V,E>
Layout
implementation that positions vertices equally spaced on a regular circle.Modifier and Type | Class and Description |
---|---|
protected static class |
CircleLayout.CircleVertexData |
Modifier and Type | Field and Description |
---|---|
protected com.google.common.cache.LoadingCache<V,CircleLayout.CircleVertexData> |
circleVertexDatas |
graph, initialized, locations, size
Constructor and Description |
---|
CircleLayout(Graph<V,E> g) |
Modifier and Type | Method and Description |
---|---|
protected CircleLayout.CircleVertexData |
getCircleData(V v) |
double |
getRadius() |
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(Comparator<V> comparator)
Sets the order of the vertices in the layout according to the ordering
specified by
comparator . |
void |
setVertexOrder(List<V> vertex_list)
Sets the order of the vertices in the layout according to the ordering
of
vertex_list . |
apply, getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, setSize
protected com.google.common.cache.LoadingCache<V,CircleLayout.CircleVertexData> circleVertexDatas
public double getRadius()
public void setRadius(double radius)
initialize()
is called.radius
- the radius of the circlepublic void setVertexOrder(Comparator<V> comparator)
comparator
.comparator
- the comparator to use to order the verticespublic void setVertexOrder(List<V> vertex_list)
vertex_list
.vertex_list
- a list specifying the ordering of the verticespublic void reset()
public void initialize()
Layout
protected CircleLayout.CircleVertexData getCircleData(V v)
Copyright © 2015. All rights reserved.