|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.tree.DendrogramPlacer
public class DendrogramPlacer
The DendrogramPlacer arranges subtrees as dendrograms.
This NodePlacer arranges nodes from top to bottom. It arranges subtrees in such a way that all subtrees of a
single local root are aligned with their bottom border.
Note: This implementation does not support PortConstraints.
![]() |
![]() |
![]() |
![]() |
| Field Summary |
|---|
| Fields inherited from interface y.layout.tree.NodePlacer |
|---|
DIRECTION_ANY, DIRECTION_EAST, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_WEST |
| Constructor Summary | |
|---|---|
DendrogramPlacer()
Creates a new DendrogramPlacer instance with default settings. |
|
| Method Summary | |
|---|---|
java.util.Comparator |
createComparator()
Creates a Comparator that sorts outgoing edges according to the x-coordinate of their target nodes. |
java.util.Comparator |
createFromSketchComparator()
Creates a Comparator for the edges which takes the initial x-coordinates of the nodes into account. |
Processor |
createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
Creates an optional Processor for pre- and post-processing. |
void |
determineChildConnectors(Node localRoot,
DataMap connectorMap)
Provides NodePlacer.DIRECTION_NORTH for all children. |
double |
getMinimumRootDistance()
Returns the minimum distance between the GenericTreeLayouter.SubtreeShape of a root node
and the bus connecting to all of its children. |
double |
getMinimumSubtreeDistance()
Returns the minimum horizontal distance between adjacent SubtreeShapes. |
GenericTreeLayouter.SubtreeShape |
placeSubtree(DataProvider nodeShapeProvider,
DataProvider subtreeShapeProvider,
LayoutGraph graph,
Node localRoot,
byte parentConnectorDirection)
Arranges the SubtreeShapes of the local root and its children as a
dendrogram. |
void |
setMinimumRootDistance(double minimumRootDistance)
Specifies the minimum distance between the GenericTreeLayouter.SubtreeShape of a root node
and the bus connecting to all of its children. |
void |
setMinimumSubtreeDistance(double minimumSubtreeDistance)
Specifies the minimum horizontal distance between adjacent SubtreeShapes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DendrogramPlacer()
DendrogramPlacer instance with default settings.
| Method Detail |
|---|
public double getMinimumRootDistance()
GenericTreeLayouter.SubtreeShape of a root node
and the bus connecting to all of its children.
The distance needs to be non-negative.
setMinimumRootDistance(double)public void setMinimumRootDistance(double minimumRootDistance)
GenericTreeLayouter.SubtreeShape of a root node
and the bus connecting to all of its children.
The distance needs to be non-negative.
public double getMinimumSubtreeDistance()
SubtreeShapes.
The distance needs to be non-negative.
GenericTreeLayouter.SubtreeShapessetMinimumSubtreeDistance(double)public void setMinimumSubtreeDistance(double minimumSubtreeDistance)
SubtreeShapes.
The distance needs to be non-negative.
public void determineChildConnectors(Node localRoot,
DataMap connectorMap)
NodePlacer.DIRECTION_NORTH for all children. Edges will always connect to the top of the child nodes.
determineChildConnectors in interface NodePlacerlocalRoot - the local root nodeconnectorMap - the map that is used for storing the direction specifiers of the child nodespublic java.util.Comparator createComparator()
Comparator that sorts outgoing edges according to the x-coordinate of their target nodes.
This Comparator can be used for achieving a From Sketch layout.
ComparatorcreateFromSketchComparator()
public GenericTreeLayouter.SubtreeShape placeSubtree(DataProvider nodeShapeProvider,
DataProvider subtreeShapeProvider,
LayoutGraph graph,
Node localRoot,
byte parentConnectorDirection)
SubtreeShapes of the local root and its children as a
dendrogram.
placeSubtree in interface NodePlacernodeShapeProvider - the DataProvider for obtaining an initial shape of the root nodesubtreeShapeProvider - the DataProvider for accessing the pre-calculated shapes of the subtreesgraph - the input graphlocalRoot - the root of the subtree that should be arranged by this methodparentConnectorDirection - the direction specifier for the connector of the local root node to its parent node
public Processor createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
Processor for pre- and post-processing.
This implementation returns null. Hence, no pre- or post-processing is done.
createProcessor in interface NodePlacerlayouter - the current GenericTreeLayouter instancegraph - the input graphcurrentRoot - the root node handled by this NodePlacer
nullpublic java.util.Comparator createFromSketchComparator()
Comparator for the edges which takes the initial x-coordinates of the nodes into account.
This implementation delegates to createComparator().
createFromSketchComparator in interface FromSketchNodePlacerComparator for the edgescreateComparator()
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||