|
||||||||||
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.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 whether or not the subtree rooted at the given node should be layed out vertically. |
double |
getBendDistance()
Getter for property bendDistance. |
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)
|
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 |
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()
ARTreeLayouter.setHorizontalSpace(double)
public void setVerticalSpace(double vspace)
10
is set.
public double getVerticalSpace()
ARTreeLayouter.setVerticalSpace(double)
public void doLayoutCore(LayoutGraph graph)
doLayoutCore
in class CanonicMultiStageLayouter
public boolean canLayoutCore(LayoutGraph graph)
canLayoutCore
in class CanonicMultiStageLayouter
protected double getAspectRatio(Node v)
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-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |