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 |
graph, initialized, locations, size
Constructor and Description |
---|
CircleLayout()
Creates an instance which does not initialize the vertex locations.
|
CircleLayout(Graph<V,E> g)
Creates an instance for the specified graph.
|
Modifier and Type | Method and 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 by
comparator . |
void |
setVertexOrder(java.util.List<V> vertex_list)
Sets the order of the vertices in the layout according to the ordering
of
vertex_list . |
getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, setSize, transform
public CircleLayout()
public double getRadius()
public void setRadius(double radius)
initialize()
is called.public void setVertexOrder(java.util.Comparator<V> comparator)
comparator
.public void setVertexOrder(java.util.List<V> vertex_list)
vertex_list
.public void reset()
public void initialize()
Layout
protected CircleLayout.CircleVertexData getCircleData(V v)
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence