|
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.AbstractRotatableNodePlacer.RootAlignment
public abstract static class AbstractRotatableNodePlacer.RootAlignment
A AbstractRotatableNodePlacer.RootAlignment
describes how a local root node is arranged in relation to its children.
The actual placement depends on the orientation of the subtree rooted at the current local root node. All
descriptions of the provided alignments refer to the top-to-bottom orientation described by
AbstractRotatableNodePlacer.Matrix.DEFAULT
. In this case, the subtrees are placed below the local root and the local root is aligned
horizontally above them.
Constructor Summary | |
---|---|
AbstractRotatableNodePlacer.RootAlignment()
|
Method Summary | |
---|---|
protected static java.awt.geom.Rectangle2D |
getBounds(java.util.List shapes)
Calculates the common bounds of the given subtree shapes. |
protected abstract void |
placeParentHorizontal(y.layout.tree.SubtreeShapeRotated rootShape,
java.util.List shapes,
java.awt.geom.Rectangle2D shapeBounds,
double spacing)
Moves the shape of the local root to a suitable position relative to the children's shapes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final AbstractRotatableNodePlacer.RootAlignment CENTER
AbstractRotatableNodePlacer.RootAlignment
at the center of the subtrees. The root node is placed centered above its whole
subgraph. To determine the alignment, only NodeLayout
s are considered. Node labels are not
included although they are also contained in GenericTreeLayouter.SubtreeShape
s.
public static final AbstractRotatableNodePlacer.RootAlignment MEDIAN
AbstractRotatableNodePlacer.RootAlignment
at the median child node. The root node is placed above the median of its children.
To determine the alignment, only NodeLayout
s are considered. Node labels are not included
although they are also contained in GenericTreeLayouter.SubtreeShape
s.
NodePlacer
s that place all children in a single row.public static final AbstractRotatableNodePlacer.RootAlignment LEADING
AbstractRotatableNodePlacer.RootAlignment
left of the children. The local root node leaves a distance specified by the
given spacing to the leftmost child.
To determine the alignment, only NodeLayout
s are considered. Node labels are not included
although they are also contained in GenericTreeLayouter.SubtreeShape
s.
public static final AbstractRotatableNodePlacer.RootAlignment TRAILING
AbstractRotatableNodePlacer.RootAlignment
right of the children. The root node leaves a distance specified by the given
spacing to the rightmost child.
To determine the alignment, only NodeLayout
s are considered. Node labels are not included
although they are also contained in GenericTreeLayouter.SubtreeShape
s.
public static final AbstractRotatableNodePlacer.RootAlignment LEFT
AbstractRotatableNodePlacer.RootAlignment
at the left side. The root node is placed left aligned with its leftmost child.
To determine the alignment, only NodeLayout
s are considered. Node labels are not included
although they are also contained in GenericTreeLayouter.SubtreeShape
s.
public static final AbstractRotatableNodePlacer.RootAlignment RIGHT
AbstractRotatableNodePlacer.RootAlignment
at the right side. The root node is placed right aligned with its rightmost child.
To determine the alignment, only NodeLayout
s are considered. Node labels are not included
although they are also contained in GenericTreeLayouter.SubtreeShape
s.
public static final AbstractRotatableNodePlacer.RootAlignment CENTER_OVER_CHILDREN
NodeLayout
s are considered. Node labels are not included
although they are also contained in GenericTreeLayouter.SubtreeShape
s.
public static final AbstractRotatableNodePlacer.RootAlignment[] ALL
AbstractRotatableNodePlacer.RootAlignment
s.
Constructor Detail |
---|
public AbstractRotatableNodePlacer.RootAlignment()
Method Detail |
---|
protected abstract void placeParentHorizontal(y.layout.tree.SubtreeShapeRotated rootShape, java.util.List shapes, java.awt.geom.Rectangle2D shapeBounds, double spacing)
This method is called by AbstractRotatableNodePlacer
s when they
place the subtrees
.
rootShape
- the shape of the local root node that will be movedshapes
- a list of rotated subtree shapes, representing the shapes of the child nodesshapeBounds
- accumulated bounds of the shapes of all child nodesspacing
- the spacing value that should be usedprotected static java.awt.geom.Rectangle2D getBounds(java.util.List shapes)
This method can be used when placing the local root above its subtrees in method
placeParentHorizontal(SubtreeShapeRotated, List, Rectangle2D, double)
.
shapes
- a list of rotated subtree shapes
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |