ilog.cpl.interactor
Class IlpInteractionState

java.lang.Object
  extended by ilog.cpl.interactor.IlpInteractionState

public class IlpInteractionState
extends Object

Describes the state of a user interaction.

Since:
JTGO 3.0
See Also:
IlpGraphicController, IlpInteractor, IlpAbstractInteractor

Constructor Summary
IlpInteractionState()
           
 
Method Summary
 void addIncompleteGesture(IlpGesture gesture)
          Adds a gesture to the set of incomplete gestures being processed.
 IlpGesture getGesture()
          When a complete gesture has been recognized, returns this gesture, otherwise returns null.
 Set getIncompleteGestures()
          Returns the set of gestures that could possibly result from the current incomplete set of input events.
 Object getIncompleteGestureState(IlpGesture gesture)
          Returns additional state information for a gesture.
 IlpPoint getStartingPosition()
          Returns the location where a gesture started, in view coordinates.
 boolean hasIncompleteGestures()
          Returns true if there are incomplete gestures being processed.
 boolean removeIncompleteGesture(IlpGesture gesture)
          Removes a gesture from the set of incomplete gestures being processed.
 void reset()
          Resets the state.
 void setGesture(IlpGesture gesture)
          Sets a gesture which has been completely recognized.
 void setIncompleteGestureState(IlpGesture gesture, Object state)
          Associates additional state information with a gesture.
 void setStartingPosition(IlpPoint startingPosition)
          Sets the location where a gesture started, in view coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpInteractionState

public IlpInteractionState()
Method Detail

getGesture

public IlpGesture getGesture()
When a complete gesture has been recognized, returns this gesture, otherwise returns null.

See Also:
setGesture(ilog.cpl.interactor.IlpGesture)

setGesture

public void setGesture(IlpGesture gesture)
Sets a gesture which has been completely recognized.

Parameters:
gesture - A completely recognized gesture.
See Also:
getGesture()

getIncompleteGestures

public Set getIncompleteGestures()
Returns the set of gestures that could possibly result from the current incomplete set of input events.

See Also:
addIncompleteGesture(ilog.cpl.interactor.IlpGesture), removeIncompleteGesture(ilog.cpl.interactor.IlpGesture), hasIncompleteGestures()

hasIncompleteGestures

public boolean hasIncompleteGestures()
Returns true if there are incomplete gestures being processed.

See Also:
getIncompleteGestures(), addIncompleteGesture(ilog.cpl.interactor.IlpGesture), removeIncompleteGesture(ilog.cpl.interactor.IlpGesture)

addIncompleteGesture

public void addIncompleteGesture(IlpGesture gesture)
Adds a gesture to the set of incomplete gestures being processed.

Parameters:
gesture - The gesture to add to the set of incomplete gestures being processed.
Throws:
IllegalArgumentException - if the given gesture is null.
See Also:
getIncompleteGestures(), removeIncompleteGesture(ilog.cpl.interactor.IlpGesture), hasIncompleteGestures()

removeIncompleteGesture

public boolean removeIncompleteGesture(IlpGesture gesture)
Removes a gesture from the set of incomplete gestures being processed. Removes also its additional state information, if any.

Parameters:
gesture - The gesture to remove from the set of incomplete gestures being processed.
Returns:
true if the given gesture has been removed.
See Also:
getIncompleteGestures(), addIncompleteGesture(ilog.cpl.interactor.IlpGesture), hasIncompleteGestures(), setIncompleteGestureState(ilog.cpl.interactor.IlpGesture, java.lang.Object)

getIncompleteGestureState

public Object getIncompleteGestureState(IlpGesture gesture)
Returns additional state information for a gesture.

Parameters:
gesture - The gesture concerned.
See Also:
setIncompleteGestureState(ilog.cpl.interactor.IlpGesture, java.lang.Object)

setIncompleteGestureState

public void setIncompleteGestureState(IlpGesture gesture,
                                      Object state)
Associates additional state information with a gesture.

Parameters:
gesture - The gesture concerned.
state - The additional state information to associate with the given gesture.
Throws:
IllegalArgumentException - if the given gesture is null or does not belong to the list of incomplete gestures.
See Also:
getIncompleteGestureState(ilog.cpl.interactor.IlpGesture)

getStartingPosition

public IlpPoint getStartingPosition()
Returns the location where a gesture started, in view coordinates. Is null until incomplete gestures have been recognized.

See Also:
setStartingPosition(ilog.cpl.graphic.IlpPoint)

setStartingPosition

public void setStartingPosition(IlpPoint startingPosition)
Sets the location where a gesture started, in view coordinates.

Parameters:
startingPosition - The location where the gesture started.
See Also:
getStartingPosition()

reset

public void reset()
Resets the state.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.