|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgraph.layout.JGraphLayoutAlgorithm
org.jgraph.layout.RadialTreeLayoutAlgorithm
Lays out the nodes in a graph as a radial tree (root at the centre, children in concentric ovals).
The layout algorithm is similar to that described in the paper "Radial Tree Graph Drawing Algorithm for Representing Large Hierarchies" by Greg Book and Neeta Keshary.
The algorithm is modified from that in the above paper since it contains bugs and the sample code contains major inefficiencies.
Since this algorithm needs to be applied to a tree but we have a directed graph, a spanning tree is first constructed then the algorithm is applied to it.
Field Summary | |
protected double |
HEIGHT
|
static java.lang.String |
KEY_CENTRE_X
Property key for specifying the X-axis coordinate of the centre of the layout. |
static java.lang.String |
KEY_CENTRE_Y
Property key for specifying the Y-axis coordinate of the centre of the layout. |
static java.lang.String |
KEY_HEIGHT
Property key for specifying maximum height of layout area. |
static java.lang.String |
KEY_RADIUS_X
Property key for specifying the maximum horizontal distance between a parent and child node. |
static java.lang.String |
KEY_RADIUS_Y
Property key for specifying the maximum vertical distance between a parent and child node. |
static java.lang.String |
KEY_WIDTH
Property key for specifying maximum width of layout area. |
protected double |
RADIUSX
|
protected double |
RADIUSY
|
protected double |
ROOTX
|
protected double |
ROOTY
|
protected double |
WIDTH
|
Fields inherited from class org.jgraph.layout.JGraphLayoutAlgorithm |
LAYOUT_ATTRIBUTES |
Constructor Summary | |
RadialTreeLayoutAlgorithm()
|
Method Summary | |
JGraphLayoutSettings |
createSettings()
Returns an new instance of SugiyamaLayoutSettings |
java.lang.String |
getHint()
Get a human readable hint for using this layout. |
void |
run(JGraph graph,
java.lang.Object[] dynamic_cells,
java.lang.Object[] static_cells)
Applies a radial tree layout to nodes in the jgraph with respect to the supplied configuration. |
void |
setConfiguration(java.util.Properties configuration)
|
java.lang.String |
toString()
Returns the name of this algorithm in human readable form. |
Methods inherited from class org.jgraph.layout.JGraphLayoutAlgorithm |
applyLayout, applyLayout, createDialog, createDialog, getMaximumProgress, getProgress, isAllowedToRun, populateDialog, run, setAllowedToRun, setMaximumProgress, setProgress |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String KEY_WIDTH
public static final java.lang.String KEY_HEIGHT
public static final java.lang.String KEY_CENTRE_X
public static final java.lang.String KEY_CENTRE_Y
public static final java.lang.String KEY_RADIUS_X
public static final java.lang.String KEY_RADIUS_Y
protected double RADIUSX
protected double RADIUSY
protected double ROOTX
protected double ROOTY
protected double WIDTH
protected double HEIGHT
Constructor Detail |
public RadialTreeLayoutAlgorithm()
Method Detail |
public java.lang.String toString()
public java.lang.String getHint()
getHint
in class JGraphLayoutAlgorithm
public JGraphLayoutSettings createSettings()
createSettings
in class JGraphLayoutAlgorithm
public void run(JGraph graph, java.lang.Object[] dynamic_cells, java.lang.Object[] static_cells)
run
in class JGraphLayoutAlgorithm
graph
- JGraph instancedynamic_cells
- List of all nodes the layout should movestatic_cells
- List of node the layout should not move but allow forpublic void setConfiguration(java.util.Properties configuration)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |