|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.tree.AbstractRotatableNodePlacer
y.layout.tree.DoubleLinePlacer
public class DoubleLinePlacer
The DoubleLinePlacer arranges the children of a local root alternating in two lines.
This NodePlacer arranges nodes from top to bottom. It places the subtrees in two horizontal lines below the
root. They are distributed in an alternating fashion, i.e., adjacent subtrees are in different lines.
This node placer is especially useful for leaves with a large width.
![]() |
![]() |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class y.layout.tree.AbstractRotatableNodePlacer |
|---|
AbstractRotatableNodePlacer.Matrix, AbstractRotatableNodePlacer.RootAlignment |
| Field Summary |
|---|
| Fields inherited from class y.layout.tree.AbstractRotatableNodePlacer |
|---|
createdChildren, graph, modificationMatrix, nodeShapeProvider, spacing, subtreeShapeProvider |
| Fields inherited from interface y.layout.tree.NodePlacer |
|---|
DIRECTION_ANY, DIRECTION_EAST, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_WEST |
| Constructor Summary | |
|---|---|
DoubleLinePlacer()
Creates a new DoubleLinePlacer instance with the default settings. |
|
DoubleLinePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
Creates a new DoubleLinePlacer instance whose direction is specified by the given modification matrix. |
|
| Method Summary | |
|---|---|
protected byte |
determineChildConnector(Node child)
Returns NodePlacer.DIRECTION_NORTH for every given child node. |
double |
getDoubleLineSpacingRatio()
Returns the ratio of the spacing between the root and the children in the upper line
and the spacing between the two lines of subtrees. |
AbstractRotatableNodePlacer.RootAlignment |
getRootAlignment()
Returns the RootAlginment that defines how the root node
is aligned with its children and their shapes. |
protected y.layout.tree.SubtreeShapeRotated |
placeSubtree(Node localRoot,
byte parentConnectorDirection)
Places the children of the given local root alternating in two horizontal lines. |
void |
setDoubleLineSpacingRatio(double ratio)
Specifies the ratio of the spacing between the root and the children in the upper line
and the spacing between the two lines of subtrees. |
void |
setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
Specifies the RootAlginment that defines how the root node
is aligned with its children and their shapes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DoubleLinePlacer()
DoubleLinePlacer instance with the default settings.
public DoubleLinePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
DoubleLinePlacer instance whose direction is specified by the given modification matrix.
modificationMatrix - the transformation matrix for this AbstractRotatableNodePlacer
java.lang.IllegalArgumentException - if the given transformation matrix is null| Method Detail |
|---|
protected byte determineChildConnector(Node child)
NodePlacer.DIRECTION_NORTH for every given child node. Edges always connect to the top of the child
nodes.
determineChildConnector in class AbstractRotatableNodePlacerchild - the child node
NodePlacer.DIRECTION_NORTH
protected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot,
byte parentConnectorDirection)
placeSubtree in class AbstractRotatableNodePlacerlocalRoot - the local root nodeparentConnectorDirection - the direction specifier for the connector of the local root node to its parent node
public AbstractRotatableNodePlacer.RootAlignment getRootAlignment()
RootAlginment that defines how the root node
is aligned with its children and their shapes.
AbstractRotatableNodePlacer.RootAlignment instance specifying the location relative to the
subtreessetRootAlignment(AbstractRotatableNodePlacer.RootAlignment)public void setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
RootAlginment that defines how the root node
is aligned with its children and their shapes.
AbstractRotatableNodePlacer.RootAlignment.CENTERrootAlignment - the AbstractRotatableNodePlacer.RootAlignment instance specifying the location
relative to the subtrees
java.lang.IllegalArgumentException - if the given root alignment is nullpublic double getDoubleLineSpacingRatio()
spacing between the root and the children in the upper line
and the spacing between the two lines of subtrees.
setDoubleLineSpacingRatio(double)public void setDoubleLineSpacingRatio(double ratio)
spacing between the root and the children in the upper line
and the spacing between the two lines of subtrees.
ratio - the ratio to determine the spacing between the two lines of subtrees![]() 0.33 | ![]() When the ratio is 1, all nodes have equal horizontal distances |
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||