edu.uci.ics.jung.algorithms.layout
Class CircleLayout<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
      extended by edu.uci.ics.jung.algorithms.layout.CircleLayout<V,E>
All Implemented Interfaces:
Layout<V,E>, org.apache.commons.collections15.Transformer<V,Point2D>

public class CircleLayout<V,E>
extends AbstractLayout<V,E>

A Layout implementation that positions vertices equally spaced on a regular circle.

Author:
Masanori Harada

Nested Class Summary
protected static class CircleLayout.CircleVertexData
           
 
Field Summary
 
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size
 
Constructor Summary
CircleLayout(Graph<V,E> g)
          Creates an instance for the specified graph.
 
Method Summary
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(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.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleLayout

public CircleLayout(Graph<V,E> g)
Creates an instance for the specified graph.

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 before initialize() is called.


setVertexOrder

public void setVertexOrder(Comparator<V> comparator)
Sets the order of the vertices in the layout according to the ordering specified by comparator.


setVertexOrder

public void setVertexOrder(List<V> vertex_list)
Sets the order of the vertices in the layout according to the ordering of vertex_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)


Copyright © 2009. All Rights Reserved.