public enum ChildAlignmentPolicy extends Enum<ChildAlignmentPolicy>
BalloonLayout.getChildAlignmentPolicy()
Enum Constant and Description |
---|
COMPACT
Alignment policy for aligning child nodes such that the distances to their parent are kept short and drawings can
potentially become more compact.
|
PLAIN
Alignment policy to align child nodes rooted at the same parent such that the border of their convex hull has the same
distance to the parent node's center.
|
SAME_CENTER
Alignment policy to align child nodes rooted at the same parent such that each child has the same center-to-center
distance to the parent node.
|
SMART
Alignment policy to align child nodes rooted at the same parent using a mixture of the other policies and aiming to
achieve symmetry and compactness at the same time.
|
Modifier and Type | Method and Description |
---|---|
static ChildAlignmentPolicy |
fromOrdinal(int ordinal) |
int |
value() |
static ChildAlignmentPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ChildAlignmentPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChildAlignmentPolicy COMPACT
This policy realizes the exact same child alignment as PLAIN
if there are no edge labels associated with edges
going to child nodes or if integrated edge labeling
is disabled.
If edge labels need to be considered, edge labels will be added to the convex hull of the child node to which the edge connects. This means that child nodes connected with a labeled edge will be aligned at the border where the edge label begins. In consequence, edge labels will be aligned with neighboring edge labels as well as neighboring child nodes if a child node has no edge label at its incoming edge.
This alignment strategy is especially effective if large edge labels need to be considered while drawings should still be compact and distances from parent to child nodes short.
BalloonLayout.setChildAlignmentPolicy(ChildAlignmentPolicy)
public static final ChildAlignmentPolicy PLAIN
BalloonLayout.setChildAlignmentPolicy(ChildAlignmentPolicy)
public static final ChildAlignmentPolicy SAME_CENTER
All nodes will be placed on a common radius around their parent, respective to their center coordinates.
interleaved mode
is active.BalloonLayout.setChildAlignmentPolicy(ChildAlignmentPolicy)
public static final ChildAlignmentPolicy SMART
Similar to
SAME_CENTER
, this policy aims to achieve alignments featuring equal distances between parent and child node
centers. However, a much larger distance for all child nodes caused by single large subtrees is avoided by this policy.
In such cases, the smaller subtrees may be placed on a common radius and the large subtrees are placed with different
distances.
InterleavedMode
. In that case, a plain child alignment
will be applied instead.BalloonLayout.setChildAlignmentPolicy(ChildAlignmentPolicy)
public static final ChildAlignmentPolicy fromOrdinal(int ordinal)
public int value()
public static ChildAlignmentPolicy valueOf(String name)
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullname
- the name of the enum constant to be returned.public static ChildAlignmentPolicy[] values()
for (ChildAlignmentPolicy c : ChildAlignmentPolicy.values()) System.out.println(c);