Class JGraphRadialTreeLayout
java.lang.Object
com.jgraph.layout.tree.JGraphRadialTreeLayout
- All Implemented Interfaces:
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 JGraphLayout
JGraphLayout.Stoppable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleThe initial offset to compute the angle position.protected booleanSpecifies if the radios should be computed automatically.protected doubleSpecifies the minimum and maximum autoradiusprotected doubleSpecifies the minimum and maximum autoradiusprotected doubleSpecifies the minimum and maximum autoradiusprotected doubleSpecifies the minimum and maximum autoradiusprotected booleanSpecifies whether root cells should be moved.protected MapStore of mapping from tree nodes to graph cellsprotected doublex-axis radius of each circleprotected doubley-axis radius of each circleprotected doublex-axis root of the layoutprotected doubley-axis root of the layoutprotected ObjectAn object that may be used as a key for a virtual root.Fields inherited from interface JGraphLayout
VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoubledoubledoublecom.jgraph.layout.tree.JGraphRadialTreeLayout.TreeNodegetTreeNode(Object cell) booleanbooleanvoidrun(JGraphFacade graph) Applies a radial tree layout to nodes in the jgraph with respect to the supplied configuration.voidsetAngleOffset(double angleOffset) voidsetAutoRadius(boolean autoRadius) voidsetMaxradiusx(double maxradiusx) voidsetMaxradiusy(double maxradiusy) voidsetMinradiusx(double minradiusx) voidsetMinradiusy(double minradiusy) voidsetMoveRoots(boolean moveRoots) voidsetRadiusx(double radiusx) voidsetRadiusy(double radiusy) toString()ReturnsRadialtree, the name of this algorithm.
-
Field Details
-
virtualRootCell
An object that may be used as a key for a virtual root. -
moveRoots
protected boolean moveRootsSpecifies whether root cells should be moved. Note: Single roots are never moved by this layout. -
angleOffset
protected double angleOffsetThe initial offset to compute the angle position. -
autoRadius
protected boolean autoRadiusSpecifies if the radios should be computed automatically. -
minradiusx
protected double minradiusxSpecifies the minimum and maximum autoradius -
minradiusy
protected double minradiusySpecifies the minimum and maximum autoradius -
maxradiusx
protected double maxradiusxSpecifies the minimum and maximum autoradius -
maxradiusy
protected double maxradiusySpecifies the minimum and maximum autoradius -
radiusx
protected double radiusxx-axis radius of each circle -
radiusy
protected double radiusyy-axis radius of each circle -
rootx
protected double rootxx-axis root of the layout -
rooty
protected double rootyy-axis root of the layout -
nodes
Store of mapping from tree nodes to graph cells
-
-
Constructor Details
-
JGraphRadialTreeLayout
public JGraphRadialTreeLayout()
-
-
Method Details
-
run
Applies a radial tree layout to nodes in the jgraph with respect to the supplied configuration.- Specified by:
runin interfaceJGraphLayout- Parameters:
graph- the facade describing the graph and its configuration
-
getTreeNode
- 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
-