com.tensegrity.graphics.interaction
Interface InteractionProvider

All Known Subinterfaces:
CompositeControl, CompositeGroup, CompositeNavigator, CompositeSwimLane, CompositeSwimLanePool, CompositeTable, CompositeView, VisualGraphView, VisualSubgraphComposite

public interface InteractionProvider

The InteractionProvider interface specifies a type of object that lends interaction support to objects of type BaseInteractable. In a way, this interface specifies a type of mediator that a client may speak to instead of directly communicating with a large number of interactable objects. A useful consolidation of helper methods, normally found in client code, can be found here.

NOTICE: This interface is subject to refactoring. We therefore recommend that you make as little use of it as possible.

Version:
$Id: InteractionProvider.java,v 1.27 2006/02/06 09:39:01 MichaelKegel Exp $
Author:
MichaelKegel

Method Summary
 int actAt(InteractionInfo interactionInfo)
          TODO : comment
 void descriptorChanged(BaseInteractable interactable, InteractionDescriptor newDescriptor, InteractionItem newItem)
           
 void dismissFromInteractionCycle(BaseInteractable interactable)
           
 InteractionItem getCurrentInteractionItemFor(BaseInteractable interactable)
           
 int getCursorID(InteractionInfo interactionInfo)
          Returns a cursor id which can be used to indicate that an object marked as BaseInteractable can be moved or manipulated at the position given by x and y.
 java.util.List getInteractionProviders()
          TODO : comment
 java.util.List getSelection()
          Returns a List of the currently selected objects
 Boundary getSelectionBoundingBox()
          Returns the bounding box of the current selected objects
 boolean hasMultiSelection()
          Returns a flag that indicates whether more than one object is selected or not.
 boolean hasSelection()
          TODO : comment
 boolean hasSubSelection()
          TODO : comment
 int hitsAt(InteractionInfo interactionInfo)
           
 int mouseClickAt(InteractionInfo interactionInfo)
          TODO : comment
 int mouseDownAt(InteractionInfo interactionInfo)
          TODO : comment
 int mouseMoveAt(InteractionInfo interactionInfo)
          TODO : comment
 int mouseUpAt(InteractionInfo interactionInfo)
          TODO : comment
 int postAction(InteractionInfo interactionInfo)
           
 void preAction(InteractionInfo interactionInfo)
           
 void select(BaseInteractable interactable, boolean adjustSelectionFlag)
          TODO : comment
 void selectAll()
          Selects all objects
 int selectAt(InteractionInfo interactionInfo)
          Selects an object at the location specified by the given InteractionInfo.
 int selectContaining(InteractionInfo interactionInfo, Boundary boundary)
          Selects all BaseInteractable objects that lie within the Boundary given by boundary.
 void selectSubsequent(InteractionProvider interactionProvider)
           
 void setSelection(java.util.List selectables)
          Sets the given List of objects as the current selection
 void startActionAt(InteractionInfo interactionInfo)
          TODO : comment
 int stopActionAt(InteractionInfo interactionInfo)
          TODO : comment
 void unselect(BaseInteractable interactable, boolean adjustSelectionFlag)
          TODO : comment
 void unselect(java.util.List interactables)
          This method has to be called to unselect the given List of BaseInteractable objects.
 void unselectAll()
          Unselects all objects
 void unselectSubsequent(InteractionProvider interactionProvider)
           
 

Method Detail

getCursorID

public int getCursorID(InteractionInfo interactionInfo)
Returns a cursor id which can be used to indicate that an object marked as BaseInteractable can be moved or manipulated at the position given by x and y.

Returns:
int the cursor id
See Also:
cursor identifiers

getSelectionBoundingBox

public Boundary getSelectionBoundingBox()
Returns the bounding box of the current selected objects

Returns:
Boundary the bounding box

hasSelection

public boolean hasSelection()
TODO : comment

Returns:
boolean

hasMultiSelection

public boolean hasMultiSelection()
Returns a flag that indicates whether more than one object is selected or not.

Returns:
boolean that indicates a multi selection

getSelection

public java.util.List getSelection()
Returns a List of the currently selected objects

Returns:
List of the currently selected objects

setSelection

public void setSelection(java.util.List selectables)
Sets the given List of objects as the current selection

Parameters:
selectables - the List of objects to select

hasSubSelection

public boolean hasSubSelection()
TODO : comment

Returns:
boolean

getInteractionProviders

public java.util.List getInteractionProviders()
TODO : comment

Returns:

dismissFromInteractionCycle

public void dismissFromInteractionCycle(BaseInteractable interactable)

getCurrentInteractionItemFor

public InteractionItem getCurrentInteractionItemFor(BaseInteractable interactable)

descriptorChanged

public void descriptorChanged(BaseInteractable interactable,
                              InteractionDescriptor newDescriptor,
                              InteractionItem newItem)

select

public void select(BaseInteractable interactable,
                   boolean adjustSelectionFlag)
TODO : comment

Parameters:
interactable -
adjustSelectionFlag -

selectAll

public void selectAll()
Selects all objects


unselect

public void unselect(BaseInteractable interactable,
                     boolean adjustSelectionFlag)
TODO : comment

Parameters:
interactable -
adjustSelectionFlag -

unselect

public void unselect(java.util.List interactables)
This method has to be called to unselect the given List of BaseInteractable objects.


selectSubsequent

public void selectSubsequent(InteractionProvider interactionProvider)

unselectSubsequent

public void unselectSubsequent(InteractionProvider interactionProvider)

unselectAll

public void unselectAll()
Unselects all objects


hitsAt

public int hitsAt(InteractionInfo interactionInfo)

selectAt

public int selectAt(InteractionInfo interactionInfo)
Selects an object at the location specified by the given InteractionInfo.

Parameters:
interactionInfo - the InteractionInfo specifying all needed information for the selection.
Returns:
int constant that indicates what effect the selection had
See Also:
selection identifiers

selectContaining

public int selectContaining(InteractionInfo interactionInfo,
                            Boundary boundary)
Selects all BaseInteractable objects that lie within the Boundary given by boundary.

Parameters:
boundary - the rectangular area the objects to select have to lie within
Returns:
int constant that indicates what effect the selection had
See Also:
selection identifiers

mouseDownAt

public int mouseDownAt(InteractionInfo interactionInfo)
TODO : comment

Parameters:
interactionInfo -
Returns:

mouseUpAt

public int mouseUpAt(InteractionInfo interactionInfo)
TODO : comment

Parameters:
interactionInfo -
Returns:

mouseMoveAt

public int mouseMoveAt(InteractionInfo interactionInfo)
TODO : comment

Parameters:
interactionInfo -
Returns:

mouseClickAt

public int mouseClickAt(InteractionInfo interactionInfo)
TODO : comment

Parameters:
interactionInfo -
Returns:

preAction

public void preAction(InteractionInfo interactionInfo)
Parameters:
interactionInfo -

startActionAt

public void startActionAt(InteractionInfo interactionInfo)
TODO : comment


actAt

public int actAt(InteractionInfo interactionInfo)
TODO : comment

Returns:
int constant that indicates what effect the interaction had
See Also:
interaction identifiers

stopActionAt

public int stopActionAt(InteractionInfo interactionInfo)
TODO : comment

Returns:
int constant that indicates what effect the interaction had
See Also:
interaction identifiers

postAction

public int postAction(InteractionInfo interactionInfo)
Parameters:
interactionInfo -


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