|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.hierarchic.AbstractDrawer y.layout.hierarchic.TreeDrawer
public class TreeDrawer
This class implements the drawing phase of the HierarchicLayouter
(i.e., the assignment of nodes'
coordinates) for trees.
If the input graph is not a tree, an alternative drawer
is invoked.
Nested Class Summary | |
---|---|
static class |
TreeDrawer.HierarchicTreePlacer
This class places nodes on their given layers (does not change the y-coordinates) if the layout style of the hierarchic layout algorithm is set to
HierarchicLayouter.TREE . |
Field Summary |
---|
Fields inherited from class y.layout.hierarchic.AbstractDrawer |
---|
distanceToNextNode, dummyMap, edgeLengthKey, graph, minimalEdgeDistance, minimalLayerDistance, minimalMultiEdgeDistance, minimalNodeDistance |
Fields inherited from interface y.layout.hierarchic.Drawer |
---|
NODE_BORDER_BOTTOM, NODE_BORDER_LEFT, NODE_BORDER_RIGHT, NODE_BORDER_TOP, NODE_DISTANCE |
Constructor Summary | |
---|---|
TreeDrawer()
Creates a new instance of TreeDrawer with default settings. |
Method Summary | |
---|---|
protected void |
assignCoordinates(NodeList[] layerLists,
DataProvider layerID)
Assigns the final coordinates to the objects of the graph if the input graph is a tree. |
Drawer |
getAlternativeDrawer()
Returns the Drawer called when the given graph is not a tree. |
void |
setAlternativeDrawer(Drawer alternativeDrawer)
Specifies the Drawer called when the given graph is not a tree. |
void |
setMinimalEdgeDistance(double d)
Specifies the minimum distance between two edges that span the same layer. |
void |
setMinimalLayerDistance(double d)
Specifies the minimum distance between two layers. |
void |
setMinimalMultiEdgeDistance(double d)
Specifies the minimum distance between two edges sharing source/target in the same layer. |
void |
setMinimalNodeDistance(double d)
Specifies the minimum distance between two nodes in the same layer. |
Methods inherited from class y.layout.hierarchic.AbstractDrawer |
---|
assignCoordinates, assignYCoords, assignYCoords, dispose, getBottomBorder, getBottomHalf, getBottomY, getDistanceToNextNode, getFullHeight, getFullWidth, getLeftBorder, getLeftHalf, getLeftX, getMinimalEdgeDistance, getMinimalLayerDistance, getMinimalMultiEdgeDistance, getMinimalNodeDistance, getRightBorder, getRightHalf, getRightX, getTopBorder, getTopHalf, getTopY, initializeDistancesToNextNode, setDummyMap, setEdgeLengthKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeDrawer()
TreeDrawer
with default settings.
Method Detail |
---|
public void setMinimalEdgeDistance(double d)
Minimum distance must be non-negative.
setMinimalEdgeDistance
in interface Drawer
setMinimalEdgeDistance
in class AbstractDrawer
public void setMinimalMultiEdgeDistance(double d)
Minimum distance must be non-negative.
setMinimalMultiEdgeDistance
in interface Drawer
setMinimalMultiEdgeDistance
in class AbstractDrawer
public void setMinimalNodeDistance(double d)
Minimum distance must be non-negative.
setMinimalNodeDistance
in interface Drawer
setMinimalNodeDistance
in class AbstractDrawer
public void setMinimalLayerDistance(double d)
Minimum distance must be non-negative.
setMinimalLayerDistance
in interface Drawer
setMinimalLayerDistance
in class AbstractDrawer
public void setAlternativeDrawer(Drawer alternativeDrawer)
Drawer
called when the given graph is not a tree.
MedianLinearSegmentDrawer
alternativeDrawer
- the alternative Drawer
instancepublic Drawer getAlternativeDrawer()
Drawer
called when the given graph is not a tree.
Drawer
instancesetAlternativeDrawer(Drawer)
protected void assignCoordinates(NodeList[] layerLists, DataProvider layerID)
assignCoordinates
in class AbstractDrawer
layerLists
- an array of NodeList
s each of which contains nodes that belong to the same layerlayerID
- the DataProvider
that returns the zero-based index of the layer to which each node belongs
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |