Class JGraphRadialTreeLayout

java.lang.Object
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).
  • Field Details

    • 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 Details

    • JGraphRadialTreeLayout

      public JGraphRadialTreeLayout()
  • Method Details

    • 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