| 
 | 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.SimpleNodePlacer
public class SimpleNodePlacer
The SimpleNodePlacer arranges all children of a local root in a single row.
 
 
| 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 | |
|---|---|
| SimpleNodePlacer()Creates a new SimpleNodePlacerinstance with default settings. | |
| SimpleNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)Creates a new SimpleNodePlacerinstance that uses the givenmodification matrix. | |
| SimpleNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix,
                 AbstractRotatableNodePlacer.RootAlignment rootAlignment)Creates a new SimpleNodePlacerinstance that uses the givenmodification matrixandroot alignment. | |
| Method Summary | |
|---|---|
| protected  byte | determineChildConnector(Node child)Provides NodePlacer.DIRECTION_NORTHas connector direction for the child nodes. | 
|  double | getMinimumChannelSegmentDistance()Returns the minimum (non-negative) distance between edge segments that are routed orthogonally in the channel between the root node and the child nodes. | 
|  AbstractRotatableNodePlacer.RootAlignment | getRootAlignment()Returns the RootAlignmentthat defines how the root node
 is aligned with its children and their shapes. | 
|  double | getVerticalAlignment()Returns the relative vertical alignment of nodes with the same parent. | 
|  boolean | isCreateBus()Returns whether or not a bus is created in the space between the parent and its children. | 
| protected  y.layout.tree.SubtreeShapeRotated | placeSubtree(Node localRoot,
             byte parentConnectorDirection)Places the children of the local root node in a single row. | 
|  void | setCreateBus(boolean createBus)Specifies whether or not a bus is created in the space between the parent and its children. | 
|  void | setMinimumChannelSegmentDistance(double minimumChannelSegmentDistance)Specifies the minimum (non-negative) distance between edge segments that are routed orthogonally in the channel between the root node and the child nodes. | 
|  void | setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)Specifies the RootAlignmentthat defines how the root node
 is aligned with its children and their shapes. | 
|  void | setVerticalAlignment(double verticalAlignment)Specifies the relative vertical alignment of nodes with the same parent. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SimpleNodePlacer()
SimpleNodePlacer instance with default settings.
public SimpleNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
SimpleNodePlacer instance that uses the given modification matrix.
modificationMatrix - the transformation matrix for this AbstractRotatableNodePlacer
java.lang.IllegalArgumentException - if the given transformation matrix is null
public SimpleNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix,
                        AbstractRotatableNodePlacer.RootAlignment rootAlignment)
SimpleNodePlacer instance that uses the given modification matrix
 and root alignment.
modificationMatrix - the transformation matrix for this AbstractRotatableNodePlacerrootAlignment - the alignment for the local root in relation to its subtrees
java.lang.IllegalArgumentException - if the given transformation matrix or the given root alignment is null| Method Detail | 
|---|
public double getMinimumChannelSegmentDistance()
0, all segments are routed in a bus-like style.
setCreateBus(boolean) is enabled.setMinimumChannelSegmentDistance(double)public void setMinimumChannelSegmentDistance(double minimumChannelSegmentDistance)
0, all segments are routed in a bus-like style.
setCreateBus(boolean) is enabled.minimumChannelSegmentDistance - the minimum distance between edge segments
java.lang.IllegalArgumentException - if the specified distance is smaller than 0|  Minimum edge distance 0with centered ports |  Minimum edge distance 0with border-distributed ports |  Minimum edge distance 5with centered ports |  Minimum edge distance 5with border-distributed ports | 
public AbstractRotatableNodePlacer.RootAlignment getRootAlignment()
RootAlignment 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)
RootAlignment that defines how the root node
 is aligned with its children and their shapes.
AbstractRotatableNodePlacer.RootAlignment.TRAILINGrootAlignment - the AbstractRotatableNodePlacer.RootAlignment instance specifying the location
                      relative to the subtrees
java.lang.IllegalArgumentException - if the given root alignment is nullpublic double getVerticalAlignment()
0 and 1 result in a valid alignment.
 0 - nodes are top-aligned0.5 - nodes are center-aligned1 - nodes are bottom-aligned[0,1] may result in a more compact node placement with unaligned nodes,
 especially when labels are considered.
setVerticalAlignment(double)public void setVerticalAlignment(double verticalAlignment)
0 and 1 result in a valid alignment.
 0 - nodes are top-aligned0.5 - nodes are center-aligned1 - nodes are bottom-aligned[0,1] may result in a more compact node placement with unaligned nodes,
 especially when labels are considered.
protected byte determineChildConnector(Node child)
NodePlacer.DIRECTION_NORTH as connector direction for the child nodes.
determineChildConnector in class AbstractRotatableNodePlacerchild - the child node
NodePlacer.DIRECTION_NORTHpublic boolean isCreateBus()
true if the bus is created, false otherwisesetCreateBus(boolean)public void setCreateBus(boolean createBus)
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
| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||