JGraph
v5.13.0.0


com.jgraph.layout.tree
Class JGraphRadialTreeLayout

java.lang.Object
  extended by com.jgraph.layout.tree.JGraphRadialTreeLayout
All Implemented Interfaces:
JGraphLayout

public class JGraphRadialTreeLayout
extends Object
implements JGraphLayout

Lays out the nodes in a graph as a radial tree (root at the centre, children in concentric ovals).


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jgraph.layout.JGraphLayout
JGraphLayout.Stoppable
 
Field Summary
protected  double angleOffset
          The initial offset to compute the angle position.
protected  boolean autoRadius
          Specifies if the radios should be computed automatically.
protected  double maxradiusx
          Specifies the minimum and maximum autoradius
protected  double maxradiusy
          Specifies the minimum and maximum autoradius
protected  double minradiusx
          Specifies the minimum and maximum autoradius
protected  double minradiusy
          Specifies the minimum and maximum autoradius
protected  boolean moveRoots
          Specifies whether root cells should be moved.
protected  Map nodes
          Store of mapping from tree nodes to graph cells
protected  double radiusx
          x-axis radius of each circle
protected  double radiusy
          y-axis radius of each circle
protected  double rootx
          x-axis root of the layout
protected  double rooty
          y-axis root of the layout
protected  Object virtualRootCell
          An object that may be used as a key for a virtual root.
 
Fields inherited from interface com.jgraph.layout.JGraphLayout
VERSION
 
Constructor Summary
JGraphRadialTreeLayout()
           
 
Method Summary
 double getAngleOffset()
           
 double getMaxradiusx()
           
 double getMaxradiusy()
           
 double getMinradiusx()
           
 double getMinradiusy()
           
 double getRadiusx()
           
 double getRadiusy()
           
 com.jgraph.layout.tree.JGraphRadialTreeLayout.TreeNode getTreeNode(Object cell)
           
 boolean isAutoRadius()
           
 boolean isMoveRoots()
           
 void run(JGraphFacade graph)
          Applies a radial tree layout to nodes in the jgraph with respect to the supplied configuration.
 void setAngleOffset(double angleOffset)
           
 void setAutoRadius(boolean autoRadius)
           
 void setMaxradiusx(double maxradiusx)
           
 void setMaxradiusy(double maxradiusy)
           
 void setMinradiusx(double minradiusx)
           
 void setMinradiusy(double minradiusy)
           
 void setMoveRoots(boolean moveRoots)
           
 void setRadiusx(double radiusx)
           
 void setRadiusy(double radiusy)
           
 String toString()
          Returns Radialtree, the name of this algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

virtualRootCell

protected Object virtualRootCell
An object that may be used as a key for a virtual root.


moveRoots

protected boolean moveRoots
Specifies whether root cells should be moved. Note: Single roots are never moved by this layout.


angleOffset

protected double angleOffset
The initial offset to compute the angle position.


autoRadius

protected boolean autoRadius
Specifies if the radios should be computed automatically.


minradiusx

protected double minradiusx
Specifies the minimum and maximum autoradius


minradiusy

protected double minradiusy
Specifies the minimum and maximum autoradius


maxradiusx

protected double maxradiusx
Specifies the minimum and maximum autoradius


maxradiusy

protected double maxradiusy
Specifies the minimum and maximum autoradius


radiusx

protected double radiusx
x-axis radius of each circle


radiusy

protected double radiusy
y-axis radius of each circle


rootx

protected double rootx
x-axis root of the layout


rooty

protected double rooty
y-axis root of the layout


nodes

protected transient Map nodes
Store of mapping from tree nodes to graph cells

Constructor Detail

JGraphRadialTreeLayout

public JGraphRadialTreeLayout()
Method Detail

run

public void run(JGraphFacade graph)
Applies a radial tree layout to nodes in the jgraph with respect to the supplied configuration.

Specified by:
run in interface JGraphLayout
Parameters:
graph - the facade describing the graph and its configuration

getTreeNode

public com.jgraph.layout.tree.JGraphRadialTreeLayout.TreeNode getTreeNode(Object cell)
Parameters:
cell - the cell whose tree node is to be obtained
Returns:
the tree node corresponding to the specified cell

getRadiusx

public double getRadiusx()
Returns:
the value of radiusx

setRadiusx

public void setRadiusx(double radiusx)
Parameters:
radiusx - value to set radiusx to

getRadiusy

public double getRadiusy()
Returns:
the value of radiusy

setRadiusy

public void setRadiusy(double radiusy)
Parameters:
radiusy - value to set radiusx to

getAngleOffset

public double getAngleOffset()
Returns:
Returns the angleOffset.

setAngleOffset

public void setAngleOffset(double angleOffset)
Parameters:
angleOffset - The angleOffset to set.

isAutoRadius

public boolean isAutoRadius()
Returns:
Returns the autoRadius.

setAutoRadius

public void setAutoRadius(boolean autoRadius)
Parameters:
autoRadius - The autoRadius to set.

isMoveRoots

public boolean isMoveRoots()
Returns:
Returns the moveRoots.

setMoveRoots

public void setMoveRoots(boolean moveRoots)
Parameters:
moveRoots - The moveRoots to set.

getMaxradiusx

public double getMaxradiusx()
Returns:
Returns the maxradiusx.

setMaxradiusx

public void setMaxradiusx(double maxradiusx)
Parameters:
maxradiusx - The maxradiusx to set.

getMaxradiusy

public double getMaxradiusy()
Returns:
Returns the maxradiusy.

setMaxradiusy

public void setMaxradiusy(double maxradiusy)
Parameters:
maxradiusy - The maxradiusy to set.

getMinradiusx

public double getMinradiusx()
Returns:
Returns the minradiusx.

setMinradiusx

public void setMinradiusx(double minradiusx)
Parameters:
minradiusx - The minradiusx to set.

getMinradiusy

public double getMinradiusy()
Returns:
Returns the minradiusy.

setMinradiusy

public void setMinradiusy(double minradiusy)
Parameters:
minradiusy - The minradiusy to set.

toString

public String toString()
Returns Radialtree, the name of this algorithm.

Overrides:
toString in class Object

JGraph
v5.13.0.0


Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.