|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The InteractionContext provides all functionalities needed for
the selection, movement and manipulation of a graphical object that implement
the BaseInteractable interface.
NOTICE:This class is subject of reconstruction such that it might
change in the near future. It is recommended not to make to much use of
it.
BaseInteractable,
InteractionProvider| Method Summary | |
int |
act(InteractionInfo interactionInfo)
This method has to be called from the object that holds an instance of InteractionContext to move or manipulate the current
selection. |
int |
act(InteractionInfo interactionInfo,
java.util.List interactables_fixed)
|
int |
getCursorID(InteractionInfo interactionInfo,
java.util.List interactables)
Returns a identifier for a mouse cursor that should be displayed for the given coordinate. |
int |
getInteractionProviderCount()
Returns the number of InteractionProviders that have a sub
selection. |
java.util.List |
getInteractionProviders()
Returns a List of InteractionProviders that
have a selection. |
java.util.List |
getSelection()
Returns the currently selected BaseInteractables in a
List. |
Boundary |
getSelectionBoundingBox()
Returns the bounding box of the currently selected objects. |
int |
getSelectionCount()
Returns the number of the currently selected BaseInteractables. |
boolean |
hasMultiSelection()
Returns a flag that indicates whether more than one object is selected or not. |
boolean |
hasSelection()
Returns a flag that indicates whether something is selected or not. |
boolean |
hasSubSelection()
Returns a flag that indicates whether this InteractionContext has a sub selection or not. |
int |
hits(InteractionInfo interactionInfo,
java.util.List interactables)
Checks if an BaseInteractable is hit. |
void |
internalAddInteractionProvider(InteractionProvider interactionProvider)
Internal method of the selection api. |
void |
internalChangeDescriptor(BaseInteractable interactable,
java.util.List interactables_fixed,
InteractionDescriptor newDescriptor,
InteractionItem newItem)
Internal method of the selection api. |
InteractionItem |
internalGetCurrentInteractionItemFor(BaseInteractable interactable)
Internal method of the selection api. |
void |
internalRemoveInteractionProvider(InteractionProvider interactionProvider)
Internal method of the selection api. |
boolean |
isInteractionCycleComplete()
|
boolean |
isInteractionStarted()
Returns a boolean that indicates whether an interaction has
been started on this InteractionContext. |
int |
mouseClick(InteractionInfo interactionInfo,
java.util.List interactables)
This method has to be called from the object that holds an instance of InteractionContext when a mouse button has been clicked.
|
int |
mouseDown(InteractionInfo interactionInfo,
java.util.List interactables)
This method has to be called from the object that holds an instance of InteractionContext when a mouse button has been pressed. |
int |
mouseMove(InteractionInfo interactionInfo,
java.util.List interactables)
This method has to be called from the object that holds an instance of InteractionContext when the mouse has been moved. |
int |
mouseUp(InteractionInfo interactionInfo,
java.util.List interactables)
This method has to be called from the object that holds an instance of InteractionContext when a mouse button has been released. |
void |
paint(Renderer renderer,
Device device,
Transform2D xform_context)
This method has to be called from the objects that holds an instance of InteractionContext to paint the current selection. |
int |
postAction(InteractionInfo interactionInfo,
java.util.List interactables)
TODO : comment |
void |
preAction(InteractionInfo interactionInfo,
java.util.List interactables)
TODO : comment |
void |
select(BaseInteractable interactable,
boolean adjustSelectionFlag)
Selects the BaseInteractable given by
interactable and adds it to the
InteractionContext.
|
void |
select(BaseInteractable interactable,
InteractionItem interactionItem)
Select the BaseInteractable given by
interactable and adds it to the
InteractionContext. |
int |
select(InteractionInfo interactionInfo,
java.util.List selectables)
This method has to be called from the object that holds an instance of InteractionContext to select a BaseInteractable
if it lies at the given point. |
int |
select(InteractionInfo interactionInfo,
java.util.List interactables,
Boundary boundary)
This method has to be called from the object that holds an instance of InteractionContext to select all
BaseInteractable objects that lie within the given
Boundary. |
void |
select(java.util.List selectables)
This method has to be called to select the given List of
BaseInteractable objects. |
void |
selectSubsequent(InteractionProvider interactionProvider)
Adds the InteractionProvider given by
interactionProvider to the InteractionContext.
|
void |
startAction(InteractionInfo interactionInfo)
This method has to be called from the object that holds an instance of InteractionContext before movement or manipulation of the
current selection starts. |
int |
stopAction(InteractionInfo interactionInfo)
This method has to be called from the object that holds an instance of InteractionContext when movement or manipulation of the
current selection is done. |
void |
unselect()
This method has to be called to unselect each BaseInteractable that is currently selected. |
void |
unselect(BaseInteractable interactable,
boolean adjustSelectionFlag)
Unselects the BaseInteractable given by
interactable and removes it from the
InteractionContext.
|
void |
unselect(java.util.List interactables)
This method has to be called to unselect the given List of
BaseInteractable objects. |
void |
unselectSubsequent(InteractionProvider interactionProvider)
Removes the InteractionProvider given by
interactionProvider from the
InteractionContext.
|
| Method Detail |
public boolean hasSelection()
public boolean hasMultiSelection()
public int getSelectionCount()
BaseInteractables.
BaseInteractablespublic java.util.List getSelection()
BaseInteractables in a
List.
List of the currently selected objectspublic boolean hasSubSelection()
InteractionContext has a sub selection or not. A sub
selection means that an InteractionProvider that belongs to
this InteractionContext has a selection.
public boolean isInteractionStarted()
boolean that indicates whether an interaction has
been started on this InteractionContext.
public boolean isInteractionCycleComplete()
public int getInteractionProviderCount()
InteractionProviders that have a sub
selection.
InteractionProviders with a sub
selectionpublic java.util.List getInteractionProviders()
List of InteractionProviders that
have a selection.InteractionProviders that have a selection must
not be selected by itself and therefore they must not but can be part of
the List returned by getSelection().
List of InteractionProviders
that have a selection
public int getCursorID(InteractionInfo interactionInfo,
java.util.List interactables)
GraphicConstants.
interactionInfo - the info values needed to find the right cursor.interactables - the List of
BaseInteractables to check for.
public int hits(InteractionInfo interactionInfo,
java.util.List interactables)
BaseInteractable is hit. The informations
needed therefore have to be given by the interactionInfo
parameter. The BaseInteractables to check have to be given
by the interactables parameter.
A constant is returned that identifies what has been hit.
interactionInfo - the info values needed to check for a hitinteractables - the List of
BaseInteractables to check for.
hit identifiers
public int select(InteractionInfo interactionInfo,
java.util.List selectables)
InteractionContext to select a BaseInteractable
if it lies at the given point.
selectables - the list of BaseInteractable objects that
can be selected.interactionInfo - the InteractionInfo holding
information on the manipulation.
selection identifiers
public int select(InteractionInfo interactionInfo,
java.util.List interactables,
Boundary boundary)
InteractionContext to select all
BaseInteractable objects that lie within the given
Boundary.
interactionInfo - the InteractionInfo holding
information on the manipulation.interactables - the list of BaseInteractable objects
that should process the mouse move interaction.boundary - the rectangle to select within
selection identifiers
public void select(BaseInteractable interactable,
boolean adjustSelectionFlag)
BaseInteractable given by
interactable and adds it to the
InteractionContext.
interactable - adjustSelectionFlag -
public void select(BaseInteractable interactable,
InteractionItem interactionItem)
BaseInteractable given by
interactable and adds it to the
InteractionContext. The InteractionItem given
by interactionItem is used for further interaction.
interactable - interactionItem - public void select(java.util.List selectables)
List of
BaseInteractable objects.
selectables - the list of BaseInteractable objects that
should be selectedpublic void unselect()
BaseInteractable that is currently selected.
public void unselect(BaseInteractable interactable,
boolean adjustSelectionFlag)
BaseInteractable given by
interactable and removes it from the
InteractionContext.
interactable - adjustSelectionFlag - public void unselect(java.util.List interactables)
List of
BaseInteractable objects.
interactables - the list of BaseInteractable objects that
should process the mouse button down interaction.public void selectSubsequent(InteractionProvider interactionProvider)
InteractionProvider given by
interactionProvider to the InteractionContext.
interactionProvider - public void unselectSubsequent(InteractionProvider interactionProvider)
InteractionProvider given by
interactionProvider from the
InteractionContext.
interactionProvider - the InteractionProvider to
removepublic Boundary getSelectionBoundingBox()
public int mouseDown(InteractionInfo interactionInfo,
java.util.List interactables)
InteractionContext when a mouse button has been pressed.
interactionInfo - the InteractionInfo holding
information on the manipulation.interactables - the list of BaseInteractable objects that
should process the mouse button down interaction.
mouse interaction identifiers
public int mouseUp(InteractionInfo interactionInfo,
java.util.List interactables)
InteractionContext when a mouse button has been released.
interactionInfo - the InteractionInfo holding
information on the manipulation.interactables - the list of BaseInteractable objects that
should process the mouse button up interaction.
mouse interaction identifiers
public int mouseClick(InteractionInfo interactionInfo,
java.util.List interactables)
InteractionContext when a mouse button has been clicked.
Clicked means in this case that a mouse buttin has been pressed and
released.
interactionInfo - the InteractionInfo holding
information on the manipulation.interactables - the list of BaseInteractable objects that
should process the mouse move interaction.
mouse interaction identifiers
public int mouseMove(InteractionInfo interactionInfo,
java.util.List interactables)
InteractionContext when the mouse has been moved.
interactionInfo - the InteractionInfo holding
information on the manipulation.interactables - the list of BaseInteractable objects that
should process the mouse move interaction.
mouse interaction identifiers
public void preAction(InteractionInfo interactionInfo,
java.util.List interactables)
interactionInfo - interactables - public void startAction(InteractionInfo interactionInfo)
InteractionContext before movement or manipulation of the
current selection starts.
interactionInfo - the InteractionInfo holding
information on the manipulation.public int act(InteractionInfo interactionInfo)
InteractionContext to move or manipulate the current
selection.
interactionInfo - the InteractionInfo holding
information on the manipulation.
interaction identifiers
public int act(InteractionInfo interactionInfo,
java.util.List interactables_fixed)
public int stopAction(InteractionInfo interactionInfo)
InteractionContext when movement or manipulation of the
current selection is done.
interactionInfo - the InteractionInfo holding
information on the manipulation.
interaction identifiers
public int postAction(InteractionInfo interactionInfo,
java.util.List interactables)
interactionInfo - interactables -
public void paint(Renderer renderer,
Device device,
Transform2D xform_context)
InteractionContext to paint the current selection.
renderer - the Renderer to render withdevice - the Device to paint ontoxform_context - the transformation of the contextpublic void internalRemoveInteractionProvider(InteractionProvider interactionProvider)
public void internalAddInteractionProvider(InteractionProvider interactionProvider)
public InteractionItem internalGetCurrentInteractionItemFor(BaseInteractable interactable)
interactable -
public void internalChangeDescriptor(BaseInteractable interactable,
java.util.List interactables_fixed,
InteractionDescriptor newDescriptor,
InteractionItem newItem)
interactable - |param interactables_fixednewDescriptor - newItem -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||