|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.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 PortConstraint
s.
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.SubtreeShape
ssetMinimumSubtreeDistance(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 NodePlacer
localRoot
- 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.
Comparator
createFromSketchComparator()
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 NodePlacer
nodeShapeProvider
- 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 NodePlacer
layouter
- the current GenericTreeLayouter
instancegraph
- the input graphcurrentRoot
- the root node handled by this NodePlacer
null
public 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 FromSketchNodePlacer
Comparator
for the edgescreateComparator()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |