edu.uci.ics.jung.visualization.contrib
Class CircleLayout

java.lang.Object
  extended byedu.uci.ics.jung.visualization.AbstractLayout
      extended byedu.uci.ics.jung.visualization.contrib.CircleLayout
All Implemented Interfaces:
Layout

public class CircleLayout
extends AbstractLayout

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

Author:
Masanori Harada

Nested Class Summary
static class CircleLayout.CircleVertexData
           
 
Constructor Summary
CircleLayout(Graph g)
           
 
Method Summary
 void advancePositions()
          Do nothing.
 CircleLayout.CircleVertexData getCircleData(Vertex v)
           
 java.lang.Object getKey()
          Returns a visualization-specific key (that is, specific both to this instance and AbstractLayout) that can be used to access UserData related to the AbstractLayout.
 double getRadius()
           
 java.lang.String getStatus()
          Returns the current status of the sytem, or null if there is no particular status to report. Useful for reporting things like number of iterations passed, temperature, and so on.By default, an AbstractLayout returns null for its status.By default, an AbstractLayout returns null for its status.
 boolean incrementsAreDone()
          Returns true;
 boolean isIncremental()
          This one is not incremental.
 void orderVertices(Vertex[] vertices)
          Specifies the order of vertices.
 void setRadius(double radius)
           
 
Methods inherited from class edu.uci.ics.jung.visualization.AbstractLayout
applyFilter, dontMove, forceMove, getBaseKey, getCoordinates, getCurrentSize, getEdge, getEdge, getGraph, getVertex, getVertex, getVisibleEdges, getVisibleVertices, getX, getY, initialize, lockVertex, resize, restart, unlockVertex
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleLayout

public CircleLayout(Graph g)
Method Detail

getStatus

public java.lang.String getStatus()
Description copied from class: AbstractLayout
Returns the current status of the sytem, or null if there is no particular status to report. Useful for reporting things like number of iterations passed, temperature, and so on.By default, an AbstractLayout returns null for its status.

Specified by:
getStatus in interface Layout
Overrides:
getStatus in class AbstractLayout

isIncremental

public boolean isIncremental()
This one is not incremental.


incrementsAreDone

public boolean incrementsAreDone()
Returns true;


getRadius

public double getRadius()

setRadius

public void setRadius(double radius)

orderVertices

public void orderVertices(Vertex[] 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.


getKey

public java.lang.Object getKey()
Returns a visualization-specific key (that is, specific both to this instance and AbstractLayout) that can be used to access UserData related to the AbstractLayout.


getCircleData

public CircleLayout.CircleVertexData getCircleData(Vertex v)

advancePositions

public void advancePositions()
Do nothing.

Specified by:
advancePositions in interface Layout
Specified by:
advancePositions in class AbstractLayout
See Also:
Layout.advancePositions()