|
|||||||||||
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.TreeLayoutAlgorithm
TODO:COMMENT ME!
Nested Class Summary | |
protected class |
TreeLayoutAlgorithm.PolyLine
|
protected class |
TreeLayoutAlgorithm.TreeNode
|
Field Summary | |
protected int |
alignment
|
protected java.util.Map |
cell2node
|
protected boolean |
centerRoot
|
protected boolean |
combineLevelNodes
|
protected JGraph |
graph
|
protected int |
levelDistance
|
protected int |
nodeDistance
|
protected int |
orientation
|
Fields inherited from class org.jgraph.layout.JGraphLayoutAlgorithm |
LAYOUT_ATTRIBUTES |
Constructor Summary | |
TreeLayoutAlgorithm()
|
Method Summary | |
protected TreeLayoutAlgorithm.TreeNode |
buildTree(CellView view)
|
protected java.util.List |
buildTrees(java.util.List roots)
|
JGraphLayoutSettings |
createSettings()
Subclassers may return a new JComponent that allows to configure the layout. |
protected int |
distance(TreeLayoutAlgorithm.PolyLine right,
TreeLayoutAlgorithm.PolyLine left)
|
int |
getAlignment()
|
protected java.util.List |
getChildren(CellView view)
|
java.lang.String |
getHint()
Get a human readable hint for using this layout. |
protected TreeLayoutAlgorithm.TreeNode |
getLeftMostX(TreeLayoutAlgorithm.TreeNode node)
|
int |
getLevelDistance()
|
int |
getNodeDistance()
|
int |
getOrientation()
|
protected TreeLayoutAlgorithm.TreeNode |
getRightMostX(TreeLayoutAlgorithm.TreeNode node)
|
protected TreeLayoutAlgorithm.TreeNode |
getTreeNode(CellView view)
|
boolean |
isCenterRoot()
|
boolean |
isCombineLevelNodes()
|
protected void |
join(TreeLayoutAlgorithm.TreeNode node)
|
protected void |
layout(TreeLayoutAlgorithm.TreeNode node)
|
protected void |
layoutTrees(java.util.List roots)
|
protected void |
merge(TreeLayoutAlgorithm.PolyLine main,
TreeLayoutAlgorithm.PolyLine left,
int distance)
|
void |
run(JGraph graph,
java.lang.Object[] dynamic_cells,
java.lang.Object[] static_cells)
Executes the layout algorithm specifying which cells are to remain in place after the layout is applied. |
void |
setAlignment(int alignment)
SwingConstants.TOP SwingConstants.CENTER SwingConstants.BOTTOM |
void |
setCenterRoot(boolean b)
|
void |
setCombineLevelNodes(boolean combineLevelNodes)
|
void |
setLevelDistance(int distance)
|
protected void |
setLevelHeights(java.util.List roots)
|
void |
setNodeDistance(int distance)
|
void |
setOrientation(int orientation)
SwingConstants.NORTH SwingConstants.EAST SwingConstants.SOUTH SwingConstants.WEST |
protected void |
setPosition(java.util.List roots)
|
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 |
protected int alignment
protected int orientation
protected int levelDistance
protected int nodeDistance
protected boolean centerRoot
protected boolean combineLevelNodes
protected JGraph graph
protected java.util.Map cell2node
Constructor Detail |
public TreeLayoutAlgorithm()
Method Detail |
public java.lang.String toString()
public java.lang.String getHint()
getHint
in class JGraphLayoutAlgorithm
public JGraphLayoutSettings createSettings()
JGraphLayoutAlgorithm
null
.
createSettings
in class JGraphLayoutAlgorithm
public void setAlignment(int alignment)
alignment
- public void setOrientation(int orientation)
public void setLevelDistance(int distance)
public void setNodeDistance(int distance)
public void setCenterRoot(boolean b)
public void run(JGraph graph, java.lang.Object[] dynamic_cells, java.lang.Object[] static_cells)
JGraphLayoutAlgorithm
run
in class JGraphLayoutAlgorithm
graph
- JGraph to be altered by layoutdynamic_cells
- Cells that are to be moved by the layoutstatic_cells
- Cells that are not to be moved, but allowed for by the layoutprotected java.util.List buildTrees(java.util.List roots)
protected TreeLayoutAlgorithm.TreeNode buildTree(CellView view)
protected java.util.List getChildren(CellView view)
protected TreeLayoutAlgorithm.TreeNode getTreeNode(CellView view)
protected void layoutTrees(java.util.List roots)
protected void layout(TreeLayoutAlgorithm.TreeNode node)
protected void join(TreeLayoutAlgorithm.TreeNode node)
protected TreeLayoutAlgorithm.TreeNode getLeftMostX(TreeLayoutAlgorithm.TreeNode node)
protected TreeLayoutAlgorithm.TreeNode getRightMostX(TreeLayoutAlgorithm.TreeNode node)
protected void merge(TreeLayoutAlgorithm.PolyLine main, TreeLayoutAlgorithm.PolyLine left, int distance)
protected int distance(TreeLayoutAlgorithm.PolyLine right, TreeLayoutAlgorithm.PolyLine left)
protected void setPosition(java.util.List roots)
protected void setLevelHeights(java.util.List roots)
public boolean isCombineLevelNodes()
public void setCombineLevelNodes(boolean combineLevelNodes)
combineLevelNodes
- The combineLevelNodes to set.public int getAlignment()
public boolean isCenterRoot()
public int getLevelDistance()
public int getNodeDistance()
public int getOrientation()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |