|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.grouping.InsetsGroupBoundsCalculator y.layout.grouping.MinimumSizeGroupBoundsCalculator y.layout.organic.EllipticalGroupBoundsCalculator
public class EllipticalGroupBoundsCalculator
EllipticalGroupBoundsCalculator
is a GroupBoundsCalculator
implementation which
assumes that group nodes have an elliptical shape.
It will calculate the size of a group node so that its child nodes fit in the ellipse defined by the node bounds. This class also supports non-rectangular shapes for the children of the group node and will calculate the size according to these shapes.
RecursiveGroupLayouter
and assumes
that the graph given to method calculateBounds(LayoutGraph, Node, NodeList)
only contains the content of the specified group
(which is always true if it is called within the RecursiveGroupLayouter
).EllipticalGroupBoundsCalculator.ShapePointProvider
,
SHAPE_POINT_PROVIDER_DPKEY
Nested Class Summary | |
---|---|
static class |
EllipticalGroupBoundsCalculator.EllipticalShapePointProvider
This is a default implementation of EllipticalGroupBoundsCalculator.ShapePointProvider
that assumes elliptical node shapes. |
static interface |
EllipticalGroupBoundsCalculator.ShapePointProvider
A ShapePointProvider retrieves the points that lie
on the convex hull (the shape points) of the visual shape of the nodes in the graph. |
Field Summary | |
---|---|
static java.lang.Object |
SHAPE_POINT_PROVIDER_DPKEY
A DataProvider key for specifying a shape for each node contained in a group node
The DataProvider registered with this key will be used when
calculating the bounds of a group node. |
Constructor Summary | |
---|---|
EllipticalGroupBoundsCalculator()
Creates a new EllipticalGroupBoundsCalculator instance. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
calculateBounds(LayoutGraph graph,
Node groupNode,
NodeList children)
Calculates the bounds for the given group node such that the contained child nodes will be included in the ellipse defined by the node bounds. |
Methods inherited from class y.layout.grouping.MinimumSizeGroupBoundsCalculator |
---|
getDefaultMinimumNodeSize, getMinimumNodeSizeDPKey, getXAlignment, getYAlignment, setDefaultMinimumNodeSize, setMinimumNodeSizeDPKey, setXAlignment, setYAlignment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object SHAPE_POINT_PROVIDER_DPKEY
DataProvider
key for specifying a shape for each node contained in a group node
The DataProvider
registered with this key will be used when
calculating the bounds
of a group node.
EllipticalGroupBoundsCalculator.ShapePointProvider
,
calculateBounds(LayoutGraph, Node, NodeList)
Constructor Detail |
---|
public EllipticalGroupBoundsCalculator()
EllipticalGroupBoundsCalculator
instance.
Method Detail |
---|
public java.awt.geom.Rectangle2D calculateBounds(LayoutGraph graph, Node groupNode, NodeList children)
calculateBounds
in interface GroupBoundsCalculator
calculateBounds
in class MinimumSizeGroupBoundsCalculator
RecursiveGroupLayouter
and assumes that the graph given to method calculateBounds(LayoutGraph, Node, NodeList)
only contains the content of the specified group
(which is always true if it is called within the RecursiveGroupLayouter
).graph
- the graph containing the given group and child nodesgroupNode
- the group node whose bounds will be calculatedchildren
- the list of child nodes residing inside the given group node
Rectangle2D
instance describing the bounds of the group node
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |