|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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:
void addCompositeGroupListener(CompositeGroupListener)void removeCompositeGroupListener(CompositeGroupListener)void addVetoableCompositeGroupListener(VetoableCompositeGroupListener)void removeVetoableCompositeGroupListener(VetoableCompositeGroupListener)
| 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.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.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 |
public static final int EVENT_MASK_ADD_COMPOSITE
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_ADD_COMPOSITES
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_REMOVE_COMPOSITE
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_REMOVE_COMPOSITES
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_SELECTION_CHANGED
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_COMPOSITEORDER_CHANGED
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_FOLDSTATE_CHANGE
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_SIZE_ADJUSTMENT
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int FOLDSTATE_FOLDED
CompositeGroup supports
public static final int FOLDSTATE_UNFOLDED
CompositeGroup supports
public static final int FOLDPLACEMENT_UNKNOWN
public static final int FOLDPLACEMENT_CENTERED
public static final int FOLDPLACEMENT_UPPERCORNER
public static final int SIZEADJUSTMENT_NONE
setSizeAdjustment(int),
Constant Field Valuespublic static final int SIZEADJUSTMENT_COMPOSITES
setSizeAdjustment(int),
Constant Field Valuespublic static final int SIZEADJUSTMENT_COMPOSITESANDLINES
setSizeAdjustment(int),
Constant Field Values| Method Detail |
public boolean isChildSelectionEnabled()
boolean that indicates whether the selection of
BaseComposites added to the CompositeGroup is
enabled or disabled.
public void enableChildSelection(boolean enabled)
BaseComposites added
to the CompositeGroup dependent to the value given by
enabled.
BaseComposite within the
CompositeGroup through API calls. So one has to take care
of this setting.
enabled - flag that indicates whether to enable or disable child
selectionpublic boolean isChildMovementEnabled()
boolean that indicates whether the movement of
BaseComposites added to the CompositeGroup is
enabled or disabled.
public void enableChildMovement(boolean enabled)
BaseComposites added
to the CompositeGroup dependent to the value given by
enabled.
BaseComposite within the
CompositeGroup through API calls. So one has to take care
of this setting.
enabled - flag that indicates whether to enable or disable child
movementpublic boolean isChildManipulationEnabled()
boolean that indicates whether the manipulation of
BaseComposites added to the CompositeGroup is
enabled or disabled.
public void enableChildManipulation(boolean enabled)
BaseComposites added
to the CompositeGroup dependent to the value given by
enabled.
BaseComposite within the
CompositeGroup through API calls. So one has to take care
of this setting.
enabled - flag that indicates whether to enable or disable child
manipulationpublic boolean isDragSource()
boolean that indicates whether the
CompositeGroup is a drag source or not.
BaseComposite
that is added to the CompositeGroup can be taken out by
user interaction.
CompositeGroup is a drag source or notpublic void setDragSource(boolean enabled)
CompositeGroup dependent to the value given by
enabled.
enabled - flag that indicates whether to enable or disable the drag
source behaviorpublic boolean isDropTarget()
boolean that indicates whether the
CompositeGroup is a drop target or not.
BaseComposite
can be added to the CompositeGroup by user interaction.
CompositeGroup is a drop target or notpublic void setDropTarget(boolean enabled)
CompositeGroup dependent to the value given by
enabled.
enabled - flag that indicates whether to enable or disable the drop
target behaviorpublic int getSizeAdjustment()
CompositeGroup.
public void setSizeAdjustment(int sizeadjustment)
sizeadjustment.
sizeadjustment - the new size adjustment modepublic boolean isAdjustSizeToSingleChild()
public void setAdjustSizeToSingleChild(boolean adjustSizeToSingleChild)
public boolean isFoldable()
boolean that indicates whether this
CompositeGroup is foldable or not.
CompositeGrouppublic void setFoldable(boolean foldable)
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.
foldable - the new fold state for the CompositeGrouppublic int getFoldPlacement()
getFoldingAnchor() instead
public void setFoldPlacement(int foldplacement)
setFoldingAnchor(Anchor) instead
foldplacement - the position of the fold button.public Anchor getFoldingAnchor()
public void setFoldingAnchor(Anchor anchor)
public int getFoldState()
CompositeGroup. If the
CompositeGroup is not foldable FOLDSTATE_UNFOLDED
is returned.
CompositeGroupFOLDSTATE_FOLDED,
FOLDSTATE_UNFOLDEDpublic void setFoldState(int foldstate)
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.
foldstate - the state of folding to set the
CompositeGroup toFOLDSTATE_FOLDED,
FOLDSTATE_UNFOLDEDpublic void toggleFoldState()
FOLDSTATE_FOLDED,
FOLDSTATE_UNFOLDEDpublic Size getFoldStateSize(int foldstate)
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.
foldstate - the constant of the fold state the extensions should be
returned for
CompositeGroup in the actual state of folding
public void setFoldStateSize(int foldstate,
Size size)
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.
foldstate - the constant of the fold state the extensions should be
adjusted forsize - the new extensions for the state of folding defined through
the parameterpublic Anchor getFoldStateButtonAnchor()
public void setFoldStateButtonAnchor(Anchor anchor)
public Size getFoldStateButtonSize()
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.
public void setFoldStateButtonSize(Size size)
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.
size - the new extensions for the FoldStateButtonpublic int getFoldStateButtonCursor()
public void setFoldStateButtonCursor(int cursorID)
public java.lang.String getFoldedGeometry()
public void setFoldedGeometry(java.lang.String geometryname)
public java.lang.String getFoldedStyle()
public void setFoldedStyle(java.lang.String stylename)
public int getHorizontalContentBorder()
CompositeGroup to the content of it.
public void setHorizontalContentBorder(int border)
CompositeGroup to the content of it.
border - the new value for the horizontal content borderpublic int getVerticalContentBorder()
CompositeGroup to the content of it.
public void setVerticalContentBorder(int border)
CompositeGroup to the content of it.
border - the new value for the vertical content borderpublic int getContentBorderLeft()
public void setContentBorderLeft(int contentborder)
public int getContentBorderRight()
public void setContentBorderRight(int contentborder)
public int getContentBorderTop()
public void setContentBorderTop(int contentborder)
public int getContentBorderBottom()
public void setContentBorderBottom(int contentborder)
public BoundingBox computeCompositeBoundingBox()
public void adjustBoundingBoxToContent()
CompositeGroup such that it fits to
the content of the CompositeGroup.
Composites added to the
CompositeGroup.
public void layout(int left,
int top,
int right,
int bottom,
double csMinX,
double csMinY,
double csMaxX,
double csMaxY)
public void registerAdditionalInteractionHandler(CompositeInteractionHandler handler)
CompositeInteractionHandler on this
CompositeGroup.
handler - the CompositeInteractionHandler to register.public void addCompositeGroupListener(CompositeGroupListener listener)
CompositeGroupListener to the
CompositeGroups internal structure, such that the listener
is informed about every event that occurs.
listener - the CompositeGroupListener to addpublic void removeCompositeGroupListener(CompositeGroupListener listener)
CompositeGroupListener from the
CompositeGroups internal structure, such that the listener
is no longer informed about occuring events.
listener - the CompositeGroupListener to removepublic void addVetoableCompositeGroupListener(VetoableCompositeGroupListener listener)
VetoableCompositeGroupListener to the
CompositeGroups internal structure, such that the listener
is informed about every event that occurs.
listener - the VetoableCompositeGroupListener to addpublic void removeVetoableCompositeGroupListener(VetoableCompositeGroupListener listener)
VetoableCompositeGroupListener from the
CompositeGroups internal structure, such that the listener
is no longer informed about occuring events.
listener - the VetoableCompositeGroupListener to removepublic CompositeGroup deepCopy(boolean copyChildren)
CompositeGroup instance.
copyChildren - determines whether children of this group should be
copied.
CompositeGroup.public void internalFireCompositesAddedEvent(java.util.List compositesAdded)
compositesAdded - List of the
BaseComposite instances that have been addedpublic void internalFireCompositesRemovedEvent(java.util.List compositesRemoved)
compositesRemoved - List of the
BaseComposite instances that have been removedpublic void internalFireSelectionChangeEvent(java.util.List selectionOld)
selectionOld - List of the
BaseComposite instances that were selected previouslypublic boolean internalEnabledSizeAdjustment()
public void internalEnableSizeAdjustment(boolean enable)
enable - flag that indicates whether to turn size adjustment on or
off
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||