org.jgraph.layout
Class OrderedTreeLayoutAlgorithm
java.lang.Object
org.jgraph.layout.JGraphLayoutAlgorithm
org.jgraph.layout.TreeLayoutAlgorithm
org.jgraph.layout.OrderedTreeLayoutAlgorithm
- public class OrderedTreeLayoutAlgorithm
- extends TreeLayoutAlgorithm
This class is similar to the TreeLayoutAlgorithm but it will sort
the different levels of the graph using the default comparator
or a custom comparator that you supply.
Methods inherited from class org.jgraph.layout.TreeLayoutAlgorithm |
buildTree, buildTrees, createSettings, distance, getAlignment, getHint, getLeftMostX, getLevelDistance, getNodeDistance, getOrientation, getRightMostX, getTreeNode, isCenterRoot, isCombineLevelNodes, join, layout, layoutTrees, merge, run, setAlignment, setCenterRoot, setCombineLevelNodes, setLevelDistance, setLevelHeights, setNodeDistance, setOrientation, setPosition |
Methods inherited from class org.jgraph.layout.JGraphLayoutAlgorithm |
applyLayout, applyLayout, createDialog, createDialog, getMaximumProgress, getProgress, isAllowedToRun, populateDialog, run, setAllowedToRun, setMaximumProgress, setProgress |
OrderedTreeLayoutAlgorithm
public OrderedTreeLayoutAlgorithm(Comparator comparator)
- Constructor
- Parameters:
comparator
- use to sort the cells
OrderedTreeLayoutAlgorithm
public OrderedTreeLayoutAlgorithm()
- Constructor (will use the default comparator)
toString
public String toString()
- Returns the name of this algorithm in human
readable form.
- Overrides:
toString
in class TreeLayoutAlgorithm
setComparator
public void setComparator(Comparator comparator)
getComparator
public Comparator getComparator()
- Returns:
- the cell comparator
getChildren
public List getChildren(CellView view)
- Gets the children of the given cell view and sorts
it using a supplied comparator or the default comparator if
none is specified
- Overrides:
getChildren
in class TreeLayoutAlgorithm
Copyright (C) 2003-2005 Gaudenz Alder. All rights reserved.