| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.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.HierarchicTreePlacerThis class places nodes on their given layers (does not change the y-coordinates) if the layout styleof the hierarchic layout algorithm is set toHierarchicLayouter.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 TreeDrawerwith 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 Drawercalled when the given graph is not a tree. | 
|  void | setAlternativeDrawer(Drawer alternativeDrawer)Specifies the Drawercalled 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 DrawersetMinimalEdgeDistance in class AbstractDrawerpublic void setMinimalMultiEdgeDistance(double d)
Minimum distance must be non-negative.
setMinimalMultiEdgeDistance in interface DrawersetMinimalMultiEdgeDistance in class AbstractDrawerpublic void setMinimalNodeDistance(double d)
Minimum distance must be non-negative.
setMinimalNodeDistance in interface DrawersetMinimalNodeDistance in class AbstractDrawerpublic void setMinimalLayerDistance(double d)
Minimum distance must be non-negative.
setMinimalLayerDistance in interface DrawersetMinimalLayerDistance in class AbstractDrawerpublic void setAlternativeDrawer(Drawer alternativeDrawer)
Drawer called when the given graph is not a tree.
MedianLinearSegmentDraweralternativeDrawer - 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 AbstractDrawerlayerLists - an array of NodeLists 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-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||