y.layout.organic
Class EllipticalGroupBoundsCalculator
java.lang.Object
y.layout.grouping.InsetsGroupBoundsCalculator
y.layout.grouping.MinimumSizeGroupBoundsCalculator
y.layout.organic.EllipticalGroupBoundsCalculator
- All Implemented Interfaces:
- GroupBoundsCalculator
public class EllipticalGroupBoundsCalculator
- extends MinimumSizeGroupBoundsCalculator
An implementation of a GroupBoundsCalculator
that assumes that the group node has an elliptical shape.
It will calculate the size of the group node so that the containing
nodes will be contained in the ellipse defined by the node bounds.
This class also supports non-rectangular nodes as the children of the group nodes
and will calculate the size according to their shape.
- See Also:
EllipticalGroupBoundsCalculator.ShapePointProvider
,
SHAPE_POINT_PROVIDER_DPKEY
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHAPE_POINT_PROVIDER_DPKEY
public static final Object SHAPE_POINT_PROVIDER_DPKEY
DataProvider
-key used for associating EllipticalGroupBoundsCalculator.ShapePointProvider
instances with the nodes in the graph. The algorithm will query for each node contained in a group node this
interface from the data provider registered using this key to obtain the convex hull of the visual representation of
the node.
EllipticalGroupBoundsCalculator
public EllipticalGroupBoundsCalculator()
calculateBounds
public Rectangle2D calculateBounds(LayoutGraph graph,
Node groupNode,
NodeList children)
- Description copied from interface:
GroupBoundsCalculator
- This method is called during the layout process. It calculates the bounds for
the given groupNode instance that contains the children.
- Specified by:
calculateBounds
in interface GroupBoundsCalculator
- Overrides:
calculateBounds
in class MinimumSizeGroupBoundsCalculator
- Parameters:
graph
- the graph instance for which the bounds will be calculatedgroupNode
- the group node whose bounds will be calculatedchildren
- a list of nodes which reside inside the group node
- Returns:
- a Rectangle2D instance that describes the bounds of the group node.