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>

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

Positions vertices equally spaced on a regular circle. Does not respect filter calls.

Author:
Masanori Harada

Nested Class Summary
static class CircleLayout.CircleVertexData
           
 
Field Summary
 
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
initialized, locations
 
Constructor Summary
CircleLayout(Graph<V,E> g)
           
 
Method Summary
 CircleLayout.CircleVertexData getCircleData(V v)
           
 double getRadius()
           
 void initialize()
          Initializes fields in the node that may not have been set during the constructor.
 void orderVertices(V[] vertices)
          Specifies the order of vertices.
 void reset()
           
 void setRadius(double radius)
           
 
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
getGraph, getSize, getVertices, 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)
Method Detail

getRadius

public double getRadius()

setRadius

public void setRadius(double radius)

orderVertices

public void orderVertices(V[] vertices)
Specifies the order of vertices. The first element of the specified array will be positioned with angle 0 (on the X axis), and the second one will be positioned with angle 1/n, and the third one will be positioned with angle 2/n, and so on.

The default implemention shuffles elements randomly.


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

public CircleLayout.CircleVertexData getCircleData(V v)


Copyright © 2008 null. All Rights Reserved.