|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.grouping.InsetsGroupBoundsCalculator
Convenience implementation which allows for custom insets for each group node. Insets are provided through a DataProvider which must be registered with the graph prior to the invocation of the layout algorithm.
Constructor Summary | |
InsetsGroupBoundsCalculator()
Constructs an instance that uses inset provided through the dataprovider registered at the input graph with the public key GroupingKeys.GROUP_NODE_INSETS_DPKEY . |
|
InsetsGroupBoundsCalculator(Insets insets)
Like InsetsGroupBoundsCalculator.InsetsGroupBoundsCalculator(java.lang.Object, java.awt.Insets) . |
|
InsetsGroupBoundsCalculator(Object insetsDataProviderKey)
Constructs an instance using the given DataProvider key. |
|
InsetsGroupBoundsCalculator(Object insetsDataProviderKey,
Insets defaultInsets)
Constructs an instance using the given DataProvider key and default insets. |
Method Summary | |
Rectangle2D |
calculateBounds(LayoutGraph graph,
Node groupNode,
NodeList children)
This method is called during the layout process. |
protected Rectangle2D |
getNodeBounds(LayoutGraph graph,
NodeList nodes)
Calculates and returns the united bounds of the given nodes only, no labels or adjacent edges are considered. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InsetsGroupBoundsCalculator()
GroupingKeys.GROUP_NODE_INSETS_DPKEY
.
public InsetsGroupBoundsCalculator(Insets insets)
InsetsGroupBoundsCalculator.InsetsGroupBoundsCalculator(java.lang.Object, java.awt.Insets)
. Additionally an inset object
can be specified that will be used as the default if the dataprovider contains no
inset information for a specific node.
public InsetsGroupBoundsCalculator(Object insetsDataProviderKey)
public InsetsGroupBoundsCalculator(Object insetsDataProviderKey, Insets defaultInsets)
Method Detail |
public Rectangle2D calculateBounds(LayoutGraph graph, Node groupNode, NodeList children)
GroupBoundsCalculator
calculateBounds
in interface GroupBoundsCalculator
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 groupnode
protected Rectangle2D getNodeBounds(LayoutGraph graph, NodeList nodes)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |