com.tensegrity.composite
Interface CompositeGroup

All Superinterfaces:
Attributable, AttributableOnSet, BaseComposite, BaseCompositeContainer, BaseInteractable, Composite, Interactable, InteractionProvider
All Known Subinterfaces:
CompositeSwimLane, CompositeSwimLanePool, VisualSubgraphComposite

public interface CompositeGroup
extends BaseCompositeContainer, Composite, InteractionProvider

A CompositeGroup is a specialization of the Composite interface. Therefore, it is recommended that you read the documentation of the Composite interface first to acquire a basic understanding of this interface's inherited responsibility.

As seen there a Composite contains and manages child Primitive objects. A CompositeGroup, on the other hand, is capable of containing other Composite and CompositeLine objects.

The CoordinateSystem of a CompositeGroup is always mutable and thus does not get pooled.

A CompositeGroup has the ability to manage BaseComposite objects. The methods to do so are derived from class BaseCompositeContainer. A CompositeGroup may be folded, which means that the BaseComposite objects added to the CompositeGroup are not drawn to the screen.

A CompositeGroup supports two folded states. These states are defined by the following constants:

A CompositeGroup object creates additional events above and beyond a Composite. To be notified about the occurrence of these events, one has to register an object that implements the CompositeGroupListener interface.

Some of the events generated by a CompositeGroup are vetoable, which means that the processing of an event can be programmatically stopped. In order to veto an event, you have to register a VetoableCompositeGroupListener.
For more information about this interface, please take a closer look at the documentation for VetoableCompositeGroupListener.

For more information about the CompositeGroupListener, please see interface CompositeGroupListener. null
The methods a CompositeGroup provides to support the event mechanism are:

null

Version:
$Id: CompositeGroup.java,v 1.63 2006/04/27 15:30:25 MichaelKegel Exp $
Author:
MichaelKegel

Field Summary
static int EVENT_MASK_ADD_COMPOSITE
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_ADD_COMPOSITES
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_COMPOSITEORDER_CHANGED
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_FOLDSTATE_CHANGE
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_REMOVE_COMPOSITE
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_REMOVE_COMPOSITES
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_SELECTION_CHANGED
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int EVENT_MASK_SIZE_ADJUSTMENT
          Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.
static int FOLDPLACEMENT_CENTERED
          Deprecated. make use of folding anchor instead
static int FOLDPLACEMENT_UNKNOWN
          Deprecated. make use of folding anchor instead
static int FOLDPLACEMENT_UPPERCORNER
          Deprecated. make use of folding anchor instead
static int FOLDSTATE_FOLDED
          Constant that tell about a state of folding a CompositeGroup supports
static int FOLDSTATE_UNFOLDED
          Constant that tell about a state of folding a CompositeGroup supports
static int SIZEADJUSTMENT_COMPOSITES
          Constants to define the size adjustment mode.
static int SIZEADJUSTMENT_COMPOSITESANDLINES
          Constants to define the size adjustment mode.
static int SIZEADJUSTMENT_NONE
          Constants to define the size adjustment mode.
 
Fields inherited from interface com.tensegrity.composite.Composite
BBOXMASK_INCLUDE_ALL, BBOXMASK_INCLUDE_EXTERNALS_ALL, BBOXMASK_INCLUDE_EXTERNALS_BACK, BBOXMASK_INCLUDE_EXTERNALS_BOTTOM, BBOXMASK_INCLUDE_EXTERNALS_FRONT, BBOXMASK_INCLUDE_EXTERNALS_LEFT, BBOXMASK_INCLUDE_EXTERNALS_RIGHT, BBOXMASK_INCLUDE_EXTERNALS_TOP, BBOXMASK_INCLUDE_MARKER, BBOXMASK_INCLUDE_SHADOW, BBOXMASK_INCLUDE_STROKE, BBOXMASK_INCLUDE_TEXT_OUTSIDE_OF_LABELS, EVENT_MASK_CHANGE, EVENT_MASK_MOVE, EVENT_MASK_RESIZE, TRANSFORMFROM_COMPOSITE, TRANSFORMTO_COMPOSITE
 
Fields inherited from interface com.tensegrity.composite.BaseComposite
DELEGATE_INFOVALUE, EVENT_MASK_MOUSE, EVENT_MASK_SELECT, GENERAL_INFOVALUE, NON_INFOVALUE
 
Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet
TREE_SUBSET_POSTFIX
 
Method Summary
 void addCompositeGroupListener(CompositeGroupListener listener)
          Adds the given CompositeGroupListener to the CompositeGroups internal structure, such that the listener is informed about every event that occurs.
 void addVetoableCompositeGroupListener(VetoableCompositeGroupListener listener)
          Adds the given VetoableCompositeGroupListener to the CompositeGroups internal structure, such that the listener is informed about every event that occurs.
 void adjustBoundingBoxToContent()
          Adjusts the size of the CompositeGroup such that it fits to the content of the CompositeGroup.
 BoundingBox computeCompositeBoundingBox()
           
 CompositeGroup deepCopy(boolean copyChildren)
          Returns a deep-copy of this CompositeGroup instance.
 void enableChildManipulation(boolean enabled)
          Enables or disables the manipulation of BaseComposites added to the CompositeGroup dependent to the value given by enabled.
 void enableChildMovement(boolean enabled)
          Enables or disables the movement of BaseComposites added to the CompositeGroup dependent to the value given by enabled.
 void enableChildSelection(boolean enabled)
          Enables or disables the selection of BaseComposites added to the CompositeGroup dependent to the value given by enabled.
 int getContentBorderBottom()
           
 int getContentBorderLeft()
           
 int getContentBorderRight()
           
 int getContentBorderTop()
           
 java.lang.String getFoldedGeometry()
           
 java.lang.String getFoldedStyle()
           
 Anchor getFoldingAnchor()
           
 int getFoldPlacement()
          Deprecated. make use of getFoldingAnchor() instead
 int getFoldState()
          Returns the state of folding of the CompositeGroup.
 Anchor getFoldStateButtonAnchor()
           
 int getFoldStateButtonCursor()
           
 Size getFoldStateButtonSize()
          Returns a Size instance that describes the extensions for the FoldStateButton.
 Size getFoldStateSize(int foldstate)
          Returns a Size instance that describes the extensions of a CompositeGroup when it is in a folded state defined by the constant given by foldstate.
 int getHorizontalContentBorder()
          Returns the value for the horizontal border used when adjusting the bounding box of the CompositeGroup to the content of it.
 int getSizeAdjustment()
          Returns a constant that indicates the current size adjustment mode of the CompositeGroup.
 int getVerticalContentBorder()
          Returns the value for the vertical border used when adjusting the bounding box of the CompositeGroup to the content of it.
 boolean internalEnabledSizeAdjustment()
          This method is API internal and should never be called by client code.
 void internalEnableSizeAdjustment(boolean enable)
          This method is API internal and should never be called by client code.
 void internalFireCompositesAddedEvent(java.util.List compositesAdded)
          This method is API internal and should never be called by client code.
 void internalFireCompositesRemovedEvent(java.util.List compositesRemoved)
          This method is API internal and should never be called by client code.
 void internalFireSelectionChangeEvent(java.util.List selectionOld)
          This method is API internal and should never be called by client code.
 boolean isAdjustSizeToSingleChild()
           
 boolean isChildManipulationEnabled()
          Returns a boolean that indicates whether the manipulation of BaseComposites added to the CompositeGroup is enabled or disabled.
 boolean isChildMovementEnabled()
          Returns a boolean that indicates whether the movement of BaseComposites added to the CompositeGroup is enabled or disabled.
 boolean isChildSelectionEnabled()
          Returns a boolean that indicates whether the selection of BaseComposites added to the CompositeGroup is enabled or disabled.
 boolean isDragSource()
          Returns a boolean that indicates whether the CompositeGroup is a drag source or not.
 boolean isDropTarget()
          Returns a boolean that indicates whether the CompositeGroup is a drop target or not.
 boolean isFoldable()
          Returns a boolean that indicates whether this CompositeGroup is foldable or not.
 void layout(int left, int top, int right, int bottom, double csMinX, double csMinY, double csMaxX, double csMaxY)
           
 void registerAdditionalInteractionHandler(CompositeInteractionHandler handler)
          Registers an additional CompositeInteractionHandler on this CompositeGroup.
 void removeCompositeGroupListener(CompositeGroupListener listener)
          Removes the given CompositeGroupListener from the CompositeGroups internal structure, such that the listener is no longer informed about occuring events.
 void removeVetoableCompositeGroupListener(VetoableCompositeGroupListener listener)
          Removes the given VetoableCompositeGroupListener from the CompositeGroups internal structure, such that the listener is no longer informed about occuring events.
 void setAdjustSizeToSingleChild(boolean adjustSizeToSingleChild)
           
 void setContentBorderBottom(int contentborder)
           
 void setContentBorderLeft(int contentborder)
           
 void setContentBorderRight(int contentborder)
           
 void setContentBorderTop(int contentborder)
           
 void setDragSource(boolean enabled)
          Enables or disables the drag source behavior for the CompositeGroup dependent to the value given by enabled.
 void setDropTarget(boolean enabled)
          Enables or disables the drop target behavior for the CompositeGroup dependent to the value given by enabled.
 void setFoldable(boolean foldable)
          Sets the state of foldability for this CompositeGroup to the value given by foldable.
 void setFoldedGeometry(java.lang.String geometryname)
           
 void setFoldedStyle(java.lang.String stylename)
           
 void setFoldingAnchor(Anchor anchor)
           
 void setFoldPlacement(int foldplacement)
          Deprecated. make use of setFoldingAnchor(Anchor) instead
 void setFoldState(int foldstate)
          Sets the CompositeGroup to the state of folding given by state.
 void setFoldStateButtonAnchor(Anchor anchor)
           
 void setFoldStateButtonCursor(int cursorID)
           
 void setFoldStateButtonSize(Size size)
          Sets the extensions of the FoldStateButton to the extensions of the Size instance given by size.
 void setFoldStateSize(int foldstate, Size size)
          Sets the extensions of a CompositeGroup for the fold state defined by the constant given by foldstate to the extensions of the Size instance given by size.
 void setHorizontalContentBorder(int border)
          Sets the value used as horizontal border when adjusting the bounding box of the CompositeGroup to the content of it.
 void setSizeAdjustment(int sizeadjustment)
          Sets the size adjustment mode to the value given by sizeadjustment.
 void setVerticalContentBorder(int border)
          Sets the value used as vertical border when adjusting the bounding box of the CompositeGroup to the content of it.
 void toggleFoldState()
          Toggles between the different folding states.
 
Methods inherited from interface com.tensegrity.composite.BaseCompositeContainer
addComposite, addComposites, getCompositeCount, getCompositeIterator, removeAllComposites, removeComposite, removeComposites, setComposites
 
Methods inherited from interface com.tensegrity.composite.Composite
addCompositeListener, addToLocation, addVetoableCompositeListener, applyState, centerAtLocation, deepCopy, getBackgroundCursorID, getBoundingBox, getCoordinateSystem, getCoordinateSytemTransform, getLocation, getMinimumSize, getSize, getState, getTransform, internalGetHasSideHandles, internalGetKeepAspectRatioAtCornerHandles, internalSetHasSideHandles, internalSetKeepAspectRatioAtCornerHandles, layout, removeCompositeListener, removeVetoableCompositeListener, setBackgroundCursorID, setBoundingBox, setCoordinateSystem, setLocation, setMinimumSize, setSize, setTransform
 
Methods inherited from interface com.tensegrity.composite.BaseComposite
addPrimitive, adjustGeometry, adjustGeometry, applyGeometry, applyStyle, areEventsEnabled, disableEvents, draw, draw, drawComposite, enableEvents, getBaseCompositeContainer, getEventMask, getGeometryName, getInfoValue, getInfoValueIdentifier, getName, getPrimitiveIterator, getShadowColor, getShadowDirection, getStyleName, internalSetGeometryName, internalSetStyleName, isDeletable, isShadowVisible, registerAttributeConstraint, registerEventMediator, registerVetoableEventMediator, removeAllPrimitives, removePrimitive, setBaseCompositeContainer, setDeletable, setEventMask, setInfoValue, setInfoValue, setName, setShadowColor, setShadowDirection, setShadowVisible, unregisterAttributeConstraint
 
Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree
 
Methods inherited from interface com.tensegrity.generic.attribute.Attributable
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue
 
Methods inherited from interface com.tensegrity.graphics.interaction.BaseInteractable
getBoundingBox, getInteractionDescriptor, getMoveItem, hits, internalEnableSelection, internalSelect, internalSetSelected, isMovable, isSelectable, isSelected, mouseClick, mouseDown, mouseEnter, mouseExit, mouseUp, postActing, preActing, select, setMovable, setSelectable, setSelected, startAction, stopAction
 
Methods inherited from interface com.tensegrity.graphics.interaction.Interactable
calculateBoundingBox, isResizable, setResizable
 
Methods inherited from interface com.tensegrity.graphics.interaction.InteractionProvider
actAt, descriptorChanged, dismissFromInteractionCycle, getCurrentInteractionItemFor, getCursorID, getInteractionProviders, getSelection, getSelectionBoundingBox, hasMultiSelection, hasSelection, hasSubSelection, hitsAt, mouseClickAt, mouseDownAt, mouseMoveAt, mouseUpAt, postAction, preAction, select, selectAll, selectAt, selectContaining, selectSubsequent, setSelection, startActionAt, stopActionAt, unselect, unselect, unselectAll, unselectSubsequent
 

Field Detail

EVENT_MASK_ADD_COMPOSITE

public static final int EVENT_MASK_ADD_COMPOSITE
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_ADD_COMPOSITES

public static final int EVENT_MASK_ADD_COMPOSITES
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_REMOVE_COMPOSITE

public static final int EVENT_MASK_REMOVE_COMPOSITE
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_REMOVE_COMPOSITES

public static final int EVENT_MASK_REMOVE_COMPOSITES
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_SELECTION_CHANGED

public static final int EVENT_MASK_SELECTION_CHANGED
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_COMPOSITEORDER_CHANGED

public static final int EVENT_MASK_COMPOSITEORDER_CHANGED
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_FOLDSTATE_CHANGE

public static final int EVENT_MASK_FOLDSTATE_CHANGE
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

EVENT_MASK_SIZE_ADJUSTMENT

public static final int EVENT_MASK_SIZE_ADJUSTMENT
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and BaseComposite.disableEvents(int) to turn them off.

See Also:
Constant Field Values

FOLDSTATE_FOLDED

public static final int FOLDSTATE_FOLDED
Constant that tell about a state of folding a CompositeGroup supports

See Also:
Constant Field Values

FOLDSTATE_UNFOLDED

public static final int FOLDSTATE_UNFOLDED
Constant that tell about a state of folding a CompositeGroup supports

See Also:
Constant Field Values

FOLDPLACEMENT_UNKNOWN

public static final int FOLDPLACEMENT_UNKNOWN
Deprecated. make use of folding anchor instead

Constants used to define the position of the fold-button.

See Also:
Constant Field Values

FOLDPLACEMENT_CENTERED

public static final int FOLDPLACEMENT_CENTERED
Deprecated. make use of folding anchor instead

Constants used to define the position of the fold-button.

See Also:
Constant Field Values

FOLDPLACEMENT_UPPERCORNER

public static final int FOLDPLACEMENT_UPPERCORNER
Deprecated. make use of folding anchor instead

Constants used to define the position of the fold-button.

See Also:
Constant Field Values

SIZEADJUSTMENT_NONE

public static final int SIZEADJUSTMENT_NONE
Constants to define the size adjustment mode.

See Also:
setSizeAdjustment(int), Constant Field Values

SIZEADJUSTMENT_COMPOSITES

public static final int SIZEADJUSTMENT_COMPOSITES
Constants to define the size adjustment mode.

See Also:
setSizeAdjustment(int), Constant Field Values

SIZEADJUSTMENT_COMPOSITESANDLINES

public static final int SIZEADJUSTMENT_COMPOSITESANDLINES
Constants to define the size adjustment mode.

See Also:
setSizeAdjustment(int), Constant Field Values
Method Detail

isChildSelectionEnabled

public boolean isChildSelectionEnabled()
Returns a boolean that indicates whether the selection of BaseComposites added to the CompositeGroup is enabled or disabled.

Returns:
boolean flag the indicates whether child selection is enabled or not

enableChildSelection

public void enableChildSelection(boolean enabled)
Enables or disables the selection of BaseComposites added to the CompositeGroup dependent to the value given by enabled.
Notice:This setting is only used for user interaction. It is still possible to selection a BaseComposite within the CompositeGroup through API calls. So one has to take care of this setting.

Parameters:
enabled - flag that indicates whether to enable or disable child selection

isChildMovementEnabled

public boolean isChildMovementEnabled()
Returns a boolean that indicates whether the movement of BaseComposites added to the CompositeGroup is enabled or disabled.

Returns:
boolean flag the indicates whether child movement is enabled or not

enableChildMovement

public void enableChildMovement(boolean enabled)
Enables or disables the movement of BaseComposites added to the CompositeGroup dependent to the value given by enabled.
Notice:This setting is only used for user interaction. It is still possible to move a BaseComposite within the CompositeGroup through API calls. So one has to take care of this setting.

Parameters:
enabled - flag that indicates whether to enable or disable child movement

isChildManipulationEnabled

public boolean isChildManipulationEnabled()
Returns a boolean that indicates whether the manipulation of BaseComposites added to the CompositeGroup is enabled or disabled.

Returns:
boolean flag the indicates whether child manipulation is enabled or not

enableChildManipulation

public void enableChildManipulation(boolean enabled)
Enables or disables the manipulation of BaseComposites added to the CompositeGroup dependent to the value given by enabled.
Notice:This setting is only used for user interaction. It is still possible to manipulate a BaseComposite within the CompositeGroup through API calls. So one has to take care of this setting.

Parameters:
enabled - flag that indicates whether to enable or disable child manipulation

isDragSource

public boolean isDragSource()
Returns a boolean that indicates whether the CompositeGroup is a drag source or not.
Drag source means in this case that no BaseComposite that is added to the CompositeGroup can be taken out by user interaction.

Returns:
boolean flag the indicates whether the CompositeGroup is a drag source or not

setDragSource

public void setDragSource(boolean enabled)
Enables or disables the drag source behavior for the CompositeGroup dependent to the value given by enabled.

Parameters:
enabled - flag that indicates whether to enable or disable the drag source behavior

isDropTarget

public boolean isDropTarget()
Returns a boolean that indicates whether the CompositeGroup is a drop target or not.
Drop target means in this case that no BaseComposite can be added to the CompositeGroup by user interaction.

Returns:
boolean flag the indicates whether the CompositeGroup is a drop target or not

setDropTarget

public void setDropTarget(boolean enabled)
Enables or disables the drop target behavior for the CompositeGroup dependent to the value given by enabled.

Parameters:
enabled - flag that indicates whether to enable or disable the drop target behavior

getSizeAdjustment

public int getSizeAdjustment()
Returns a constant that indicates the current size adjustment mode of the CompositeGroup.

Returns:
int a constant that indicates the current size adjustment mode

setSizeAdjustment

public void setSizeAdjustment(int sizeadjustment)
Sets the size adjustment mode to the value given by sizeadjustment.
Valid values are:

Parameters:
sizeadjustment - the new size adjustment mode

isAdjustSizeToSingleChild

public boolean isAdjustSizeToSingleChild()

setAdjustSizeToSingleChild

public void setAdjustSizeToSingleChild(boolean adjustSizeToSingleChild)

isFoldable

public boolean isFoldable()
Returns a boolean that indicates whether this CompositeGroup is foldable or not.

Returns:
boolean that indicates the state of foldability for the CompositeGroup

Find more information in the class documentation


setFoldable

public void setFoldable(boolean foldable)
Sets the state of foldability for this CompositeGroup to the value given by foldable. If the CompositeGroup is no longer foldable and it is in a fold state different from FOLDSTATE_UNFOLDED the fold state will be changed to FOLDSTATE_UNFOLDED.

Parameters:
foldable - the new fold state for the CompositeGroup

Find more information in the class documentation


getFoldPlacement

public int getFoldPlacement()
Deprecated. make use of getFoldingAnchor() instead

Return the position of the fold-button.

Returns:
the position of the fold-button.

setFoldPlacement

public void setFoldPlacement(int foldplacement)
Deprecated. make use of setFoldingAnchor(Anchor) instead

Sets the placement of the fold-button. Valid values are:

Parameters:
foldplacement - the position of the fold button.

getFoldingAnchor

public Anchor getFoldingAnchor()

setFoldingAnchor

public void setFoldingAnchor(Anchor anchor)

getFoldState

public int getFoldState()
Returns the state of folding of the CompositeGroup. If the CompositeGroup is not foldable FOLDSTATE_UNFOLDED is returned.

Returns:
int the current state of folding for the CompositeGroup
See Also:
FOLDSTATE_FOLDED, FOLDSTATE_UNFOLDED

Find more information in the class documentation


setFoldState

public void setFoldState(int foldstate)
Sets the CompositeGroup to the state of folding given by state. The supported states of folding are defined through constants defined in this interface. If the CompositeGroup is not foldable nothing happens. If the CompositeGroup is actually in the given state also nothing will happen.

Parameters:
foldstate - the state of folding to set the CompositeGroup to
See Also:
FOLDSTATE_FOLDED, FOLDSTATE_UNFOLDED

Find more information in the class documentation


toggleFoldState

public void toggleFoldState()
Toggles between the different folding states.

See Also:
FOLDSTATE_FOLDED, FOLDSTATE_UNFOLDED

Find more information in the class documentation


getFoldStateSize

public Size getFoldStateSize(int foldstate)
Returns a Size instance that describes the extensions of a CompositeGroup when it is in a folded state defined by the constant given by foldstate. These extensions may vary for different states of folding. The values of the extensions are given in the coordinate system of the context the CompositeGroup lies within. Notice that at the actual state of development only the FOLDSTATE_FOLDED constant is supported.

Parameters:
foldstate - the constant of the fold state the extensions should be returned for
Returns:
Size that describes the extensions of the CompositeGroup in the actual state of folding

Find more information in the class documentation


setFoldStateSize

public void setFoldStateSize(int foldstate,
                             Size size)
Sets the extensions of a CompositeGroup for the fold state defined by the constant given by foldstate to the extensions of the Size instance given by size. The values of the extensions should be given in the coordinate system of the context the CompositeGroup lies within. When setting the extensions for the defined fold state and the CompositeGroup is actually in that state creates a ResizeEvent if one of the new extensions is different from the current extensions for that state. Notice that at the actual state of development only the FOLDSTATE_FOLDED and FOLDSTATE_UNFOLDED constants are supported.

Parameters:
foldstate - the constant of the fold state the extensions should be adjusted for
size - the new extensions for the state of folding defined through the parameter

Find more information in the class documentation


getFoldStateButtonAnchor

public Anchor getFoldStateButtonAnchor()

setFoldStateButtonAnchor

public void setFoldStateButtonAnchor(Anchor anchor)

getFoldStateButtonSize

public Size getFoldStateButtonSize()
Returns a Size instance that describes the extensions for the FoldStateButton. The values of the extensions should be given in inner coordinate system of the CompositeGroup. Notice that the FoldStateButton is the button that is used to toggle between the different folding states.

Returns:
Size that describes the extensions of the FoldStateButton

Find more information in the class documentation


setFoldStateButtonSize

public void setFoldStateButtonSize(Size size)
Sets the extensions of the FoldStateButton to the extensions of the Size instance given by size. The values of the extensions should be given in the inner coordinate system of the CompositeGroup. Notice that the FoldStateButton is the button that is used to toggle between the different folding states.

Parameters:
size - the new extensions for the FoldStateButton

Find more information in the class documentation


getFoldStateButtonCursor

public int getFoldStateButtonCursor()

setFoldStateButtonCursor

public void setFoldStateButtonCursor(int cursorID)

getFoldedGeometry

public java.lang.String getFoldedGeometry()

setFoldedGeometry

public void setFoldedGeometry(java.lang.String geometryname)

getFoldedStyle

public java.lang.String getFoldedStyle()

setFoldedStyle

public void setFoldedStyle(java.lang.String stylename)

getHorizontalContentBorder

public int getHorizontalContentBorder()
Returns the value for the horizontal border used when adjusting the bounding box of the CompositeGroup to the content of it.

Returns:
int the horizontal content border value

setHorizontalContentBorder

public void setHorizontalContentBorder(int border)
Sets the value used as horizontal border when adjusting the bounding box of the CompositeGroup to the content of it.

Parameters:
border - the new value for the horizontal content border

getVerticalContentBorder

public int getVerticalContentBorder()
Returns the value for the vertical border used when adjusting the bounding box of the CompositeGroup to the content of it.

Returns:
int the vertical content border value

setVerticalContentBorder

public void setVerticalContentBorder(int border)
Sets the value used as vertical border when adjusting the bounding box of the CompositeGroup to the content of it.

Parameters:
border - the new value for the vertical content border

getContentBorderLeft

public int getContentBorderLeft()

setContentBorderLeft

public void setContentBorderLeft(int contentborder)

getContentBorderRight

public int getContentBorderRight()

setContentBorderRight

public void setContentBorderRight(int contentborder)

getContentBorderTop

public int getContentBorderTop()

setContentBorderTop

public void setContentBorderTop(int contentborder)

getContentBorderBottom

public int getContentBorderBottom()

setContentBorderBottom

public void setContentBorderBottom(int contentborder)

computeCompositeBoundingBox

public BoundingBox computeCompositeBoundingBox()

adjustBoundingBoxToContent

public void adjustBoundingBoxToContent()
Adjusts the size of the CompositeGroup such that it fits to the content of the CompositeGroup.
Content means the Composites added to the CompositeGroup.


layout

public void layout(int left,
                   int top,
                   int right,
                   int bottom,
                   double csMinX,
                   double csMinY,
                   double csMaxX,
                   double csMaxY)

registerAdditionalInteractionHandler

public void registerAdditionalInteractionHandler(CompositeInteractionHandler handler)
Registers an additional CompositeInteractionHandler on this CompositeGroup.

Parameters:
handler - the CompositeInteractionHandler to register.

addCompositeGroupListener

public void addCompositeGroupListener(CompositeGroupListener listener)
Adds the given CompositeGroupListener to the CompositeGroups internal structure, such that the listener is informed about every event that occurs.

Parameters:
listener - the CompositeGroupListener to add

Find more information in the class documentation


removeCompositeGroupListener

public void removeCompositeGroupListener(CompositeGroupListener listener)
Removes the given CompositeGroupListener from the CompositeGroups internal structure, such that the listener is no longer informed about occuring events.

Parameters:
listener - the CompositeGroupListener to remove

Find more information in the class documentation


addVetoableCompositeGroupListener

public void addVetoableCompositeGroupListener(VetoableCompositeGroupListener listener)
Adds the given VetoableCompositeGroupListener to the CompositeGroups internal structure, such that the listener is informed about every event that occurs.

Parameters:
listener - the VetoableCompositeGroupListener to add

Find more information in the class documentation


removeVetoableCompositeGroupListener

public void removeVetoableCompositeGroupListener(VetoableCompositeGroupListener listener)
Removes the given VetoableCompositeGroupListener from the CompositeGroups internal structure, such that the listener is no longer informed about occuring events.

Parameters:
listener - the VetoableCompositeGroupListener to remove

Find more information in the class documentation


deepCopy

public CompositeGroup deepCopy(boolean copyChildren)
Returns a deep-copy of this CompositeGroup instance.

Parameters:
copyChildren - determines whether children of this group should be copied.
Returns:
a deep-copy of this CompositeGroup.

internalFireCompositesAddedEvent

public void internalFireCompositesAddedEvent(java.util.List compositesAdded)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
compositesAdded - List of the BaseComposite instances that have been added

internalFireCompositesRemovedEvent

public void internalFireCompositesRemovedEvent(java.util.List compositesRemoved)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
compositesRemoved - List of the BaseComposite instances that have been removed

internalFireSelectionChangeEvent

public void internalFireSelectionChangeEvent(java.util.List selectionOld)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
selectionOld - List of the BaseComposite instances that were selected previously

internalEnabledSizeAdjustment

public boolean internalEnabledSizeAdjustment()
This method is API internal and should never be called by client code. This method is subject to change.

Returns:
boolean flag that indicates whether size adjustment is turned on or off

internalEnableSizeAdjustment

public void internalEnableSizeAdjustment(boolean enable)
This method is API internal and should never be called by client code. This method is subject to change.

Parameters:
enable - flag that indicates whether to turn size adjustment on or off


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.