|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.CanonicMultiStageLayouter
y.layout.tree.ARTreeLayouter
public class ARTreeLayouter
This tree layouter tries to generate compact tree layouts with a certain aspect ratio. The ratio can be specified for each subtree.
Here is a sample layout output (using an aspect ratio of 1 by 2)
| Field Summary | |
|---|---|
protected LayoutGraph |
graph
|
static Object |
PLACEMENT_CORNER
A data provider value used to specify the placement of the root. |
static Object |
PLACEMENT_CORNER_SIDE
A data provider value used to specify the placement of the root. |
static Object |
PLACEMENT_CORNER_TOP
A data provider value used to specify the placement of the root. |
static Object |
PLACEMENT_TOP
A data provider value used to specify the placement of the root. |
static Object |
RATIO
The data provider key used to specify target aspect ratio. |
static Object |
ROOT_PLACEMENT
The data provider key used to specify the placement of each subtree root. |
static Object |
ROUTING_HORIZONTAL
A data provider value used to specify the routing policy of each subtree. |
static Object |
ROUTING_POLICY
The data provider key used to specify the routing policy of each subtree root. |
static Object |
ROUTING_VERTICAL
A data provider value used to specify the routing policy of each subtree. |
| Fields inherited from interface y.layout.Layouter |
|---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
| Constructor Summary | |
|---|---|
ARTreeLayouter()
|
|
| Method Summary | |
|---|---|
boolean |
canLayoutCore(LayoutGraph graph)
The core layouter can layout trees. |
protected void |
createBends(EdgeLayout el,
Node root,
Node child,
Object rootPlacement,
Object routingPolicy)
|
void |
doLayoutCore(LayoutGraph graph)
Core layout routine. |
double |
getAspectRatio()
Getter for property aspectRatio. |
protected double |
getAspectRatio(Node v)
Returns the aspectRatio that should be used for the subtree starting at the given node. |
double |
getBendDistance()
Getter for property bendDistance. |
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. |
Object |
getRootPlacement()
Getter for property rootPlacement. |
protected Object |
getRootPlacement(Object root)
|
Object |
getRoutingPolicy()
Getter for property routingPolicy. |
protected Object |
getRoutingPolicy(Object root)
|
protected NodeCursor |
getSuccessors(Node localRoot)
|
double |
getVerticalSpace()
Returns the vertical distance between adjacent nodes. |
void |
setAspectRatio(double aspectRatio)
Setter for property aspectRatio. |
void |
setBendDistance(double bendDistance)
Setter for property bendDistance. |
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 |
setRootPlacement(Object rootPlacement)
Setter for property rootPlacement. |
void |
setRoutingPolicy(Object routingPolicy)
Setter for property routingPolicy. |
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 RATIO
public static final Object ROOT_PLACEMENT
public static final Object PLACEMENT_TOP
public static final Object PLACEMENT_CORNER
public static final Object PLACEMENT_CORNER_SIDE
public static final Object PLACEMENT_CORNER_TOP
public static final Object ROUTING_POLICY
public static final Object ROUTING_HORIZONTAL
public static final Object ROUTING_VERTICAL
protected LayoutGraph graph
| Constructor Detail |
|---|
public ARTreeLayouter()
| 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 CanonicMultiStageLayouterpublic boolean canLayoutCore(LayoutGraph graph)
canLayoutCore in class CanonicMultiStageLayouterprotected double getAspectRatio(Node v)
protected NodeCursor getSuccessors(Node localRoot)
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. Note that
the algorithm will only use the order induced by the comparator if the nodes (or better
their whole subtrees) have equal size.
The default value is null which indicates that the algorithm should
use its built-in logic, only.
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.
Note that the algorithm will only use the order induced by the comparator if the nodes (or better
their whole subtrees) have equal size.
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()
protected void createBends(EdgeLayout el,
Node root,
Node child,
Object rootPlacement,
Object routingPolicy)
protected Object getRoutingPolicy(Object root)
protected Object getRootPlacement(Object root)
public double getAspectRatio()
public Object getRootPlacement()
public void setRootPlacement(Object rootPlacement)
rootPlacement - New value of property rootPlacement.public Object getRoutingPolicy()
public void setRoutingPolicy(Object routingPolicy)
routingPolicy - New value of property routingPolicy.public double getBendDistance()
public void setBendDistance(double bendDistance)
bendDistance - New value of property bendDistance.public void setAspectRatio(double aspectRatio)
aspectRatio - New value of property aspectRatio.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||