|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.CanonicMultiStageLayouter y.layout.tree.HVTreeLayouter
public class HVTreeLayouter
This tree layouter allows to layout a tree such that each subgraph rooted at a node can either have a horizontal or vertical layout.
Here is an sample output of the layouter
Field Summary | |
---|---|
protected LayoutGraph |
graph
The layout graph being acted upon. |
static Object |
HORIZONTAL_SUBTREE
Subtree orientation specifier. |
static Object |
SUBTREE_ORIENTATION
The data provider key used to specify the subtree orientation of each node in the tree. |
static Object |
VERTICAL_SUBTREE
Subtree orientation specifier. |
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
HVTreeLayouter()
|
Method Summary | |
---|---|
boolean |
canLayoutCore(LayoutGraph graph)
The core layouter can layout trees. |
void |
doLayoutCore(LayoutGraph graph)
Core layout routine. |
Comparator |
getComparator()
Returns the Comparator that will be used
to sort the outgoing edges
of each local root in the tree before they are being arranged. |
double |
getHorizontalSpace()
Returns the horizontal distance between adjacent nodes. |
protected NodeCursor |
getSuccessors(Node localParent)
|
double |
getVerticalSpace()
Returns the vertical distance between adjacent nodes. |
protected boolean |
isHorizontalRoot(Node v)
Returns whether or not the subtree rooted at the given node should be laid out horizontally. |
protected boolean |
isVerticalRoot(Node v)
Returns whether or not the subtree rooted at the given node should be laid out vertically. |
void |
setComparator(Comparator comparator)
Sets the Comparator that will be used
to sort the outgoing edges
of each local root in the tree before they are being arranged. |
void |
setHorizontalSpace(double hspace)
Sets the horizontal distance between adjacent nodes. |
void |
setVerticalSpace(double vspace)
Sets the vertical distance between adjacent nodes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object SUBTREE_ORIENTATION
HORIZONTAL_SUBTREE
, VERTICAL_SUBTREE
public static final Object HORIZONTAL_SUBTREE
public static final Object VERTICAL_SUBTREE
protected LayoutGraph graph
Constructor Detail |
---|
public HVTreeLayouter()
Method Detail |
---|
public void setHorizontalSpace(double hspace)
10
is set.
public double getHorizontalSpace()
setHorizontalSpace(double)
public void setVerticalSpace(double vspace)
10
is set.
public double getVerticalSpace()
setVerticalSpace(double)
public void doLayoutCore(LayoutGraph graph)
doLayoutCore
in class CanonicMultiStageLayouter
public boolean canLayoutCore(LayoutGraph graph)
canLayoutCore
in class CanonicMultiStageLayouter
protected boolean isVerticalRoot(Node v)
protected boolean isHorizontalRoot(Node v)
protected NodeCursor getSuccessors(Node localParent)
public Comparator getComparator()
Comparator
that will be used
to sort the outgoing edges
of each local root in the tree before they are being arranged.
The default value is null
which indicates that the algorithm should
use its built-in logic.
null
if the default
order should be used.setComparator(java.util.Comparator)
public void setComparator(Comparator comparator)
Comparator
that will be used
to sort the outgoing edges
of each local root in the tree before they are being arranged.
The default value is null
which indicates that the algorithm should
use its built-in logic.
comparator
- the new comparator to use or null
if the default
order should be used.getComparator()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |