|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.hierarchy.DefaultGenericAutoBoundsFeature
public class DefaultGenericAutoBoundsFeature
This class is an implementation of interface GenericGroupNodeRealizer.GenericAutoBoundsFeature and is
responsible for assigning node bounds for node realizers whose bounds may be determined by other factors then explicit
bound assignment. For example for GenericGroupNodeRealizer which will adjust its bounds at open and
close operations.
Method setConsiderNodeLabelSize(boolean) can be used to determine whether the state label and the first
(text) label shall be taken into account when calculating the minimum node bounds. By default this option is set to
false. Note: when activating this feature, some layout algorithms need to be given an custom implementation of GroupBoundsCalculator, so that they will also take the correct node dimensions into account when
laying out the graph.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Constructor Summary | |
|---|---|
DefaultGenericAutoBoundsFeature()
|
|
DefaultGenericAutoBoundsFeature(boolean considerNodeLabel)
|
|
| Method Summary | |
|---|---|
protected Rectangle2D |
calcMinimumBounds(NodeRealizer context)
Calculates the minimum bounds of this realizer when the group is open. |
Rectangle2D |
calcMinimumGroupBounds(NodeRealizer context)
Calculates the minimal bounding box for the graph elements contained within the associated group node. |
Rectangle2D |
calcMinimumInsetBounds(NodeRealizer context)
Calculates the minimum insets bounds of the open group node. |
protected Dimension2D |
calculateMinimalLabelSize(NodeRealizer context)
Calculates the union of the first (text) label and the state label. |
Insets |
getAutoBoundsInsets(NodeRealizer context)
|
protected HierarchyManager |
getHierarchyManager(NodeRealizer context)
Returns the hierarchy manager responsibly for managing the node represented by this realizer. |
YDimension |
getMaximumSize(NodeRealizer context)
Returns the maximum size the realizer can have. |
YDimension |
getMinimumSize(NodeRealizer context)
Returns the minimum size the realizer must have. |
boolean |
isConsiderNodeLabelSize()
Returns whether label sizes will be taken into account when calculating the minimal node bounds. |
void |
labelBoundsChanged(NodeRealizer context,
NodeLabel label)
Called when the bounds of a label of the given NodeRealizer have been changed. |
void |
recalculateBounds(NodeRealizer context)
Recalculates the bounds of a group realizer. |
void |
setConsiderNodeLabelSize(boolean considerNodeLabelSize)
Whether label sizes shall be taken into account when calculating the minimal node bounds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultGenericAutoBoundsFeature()
public DefaultGenericAutoBoundsFeature(boolean considerNodeLabel)
| Method Detail |
|---|
public boolean isConsiderNodeLabelSize()
calculateMinimalLabelSize(y.view.NodeRealizer) determines which labels are taken into account.
By default this is the first text label and the state label.
By default this option is set to false.
public void setConsiderNodeLabelSize(boolean considerNodeLabelSize)
calculateMinimalLabelSize(y.view.NodeRealizer) determines which labels are taken into account.
By default this is the first text label and the state label.
By default this option is set to false.
considerNodeLabelSize - whether node label sizes shall be considered when recalculating the group node's
bounds. By default this is set to false.public void recalculateBounds(NodeRealizer context)
GenericGroupNodeRealizer.GenericAutoBoundsFeature
recalculateBounds in interface GenericGroupNodeRealizer.GenericAutoBoundsFeaturecontext - the group realizerprotected Rectangle2D calcMinimumBounds(NodeRealizer context)
context - the realizer this feature is associated with.
protected Dimension2D calculateMinimalLabelSize(NodeRealizer context)
context - the realizer this feature is associated with.
public Rectangle2D calcMinimumInsetBounds(NodeRealizer context)
calcMinimumInsetBounds in interface GenericGroupNodeRealizer.GenericAutoBoundsFeaturecontext - the group realizer
public Rectangle2D calcMinimumGroupBounds(NodeRealizer context)
context - the realizer this feature is associated with.
public Insets getAutoBoundsInsets(NodeRealizer context)
getAutoBoundsInsets in interface GenericGroupNodeRealizer.GenericAutoBoundsFeaturecontext - the group realizer
protected HierarchyManager getHierarchyManager(NodeRealizer context)
context - the realizer this feature is associated with.
public void labelBoundsChanged(NodeRealizer context,
NodeLabel label)
GenericNodeRealizer.LabelBoundsChangedHandler
labelBoundsChanged in interface GenericNodeRealizer.LabelBoundsChangedHandlercontext - the NodeRealizer whose labels' bounds have changed.label - the label whoose bounds have changedpublic YDimension getMinimumSize(NodeRealizer context)
GenericNodeRealizer.GenericSizeConstraintProvider
getMinimumSize in interface GenericNodeRealizer.GenericSizeConstraintProviderpublic YDimension getMaximumSize(NodeRealizer context)
GenericNodeRealizer.GenericSizeConstraintProvider
getMaximumSize in interface GenericNodeRealizer.GenericSizeConstraintProvider
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||