ilog.cpl.interactor
Class IlpGestureAction

java.lang.Object
  extended by ilog.cpl.interactor.IlpInteractorAction
      extended by ilog.cpl.interactor.IlpGestureAction

public class IlpGestureAction
extends IlpInteractorAction

This class represents a JavaBean object that contains information about an action performed by an interactor. This action is only triggered if the gesture and its modifiers are recognized by the interactor.

A gesture action is defined by the following attributes:

This class can be used to configure interactors via the CSS. The following example illustrates how this configuration can be accomplished:

 Interactor {
   viewInteractor: @+viewInt;
 }
 Subobject#viewInt {
   class: 'ilog.cpl.interactor.IlpDefaultViewInteractor';
   action[0]: @+keyAction0;
 }
 Subobject#keyAction0 {
   class: 'ilog.cpl.interactor.IlpGestureAction';
   gesture: BUTTON1_CLICKED;
   modifiers: shift;
   action: @+action0;
 }
 Subobject#action0 {
   class: 'mypackage.myActionClass';
 }
 

Since:
JTGO 4.0

Constructor Summary
IlpGestureAction()
          Default constructor.
IlpGestureAction(IlpGesture g, int m, Action a)
          Creates a new interactor action with the given configuration.
 
Method Summary
 IlpGesture getGesture()
          Returns the gesture that is recognized by the interactor to trigger an action.
 int getModifiers()
          Returns the modifiers applied to the gesture in order to trigger an action.
 int getModifiersEx()
          Returns the modifiers as defined since JDK 1.4 using XXX_DOWN_MASK elements.
 void setGesture(IlpGesture g)
          Defines the gesture that is recognized by the interactor to trigger an action.
 void setModifiers(int modifiers)
          Defines modifiers that are used together with the gesture to define when an action should be triggered.
 
Methods inherited from class ilog.cpl.interactor.IlpInteractorAction
getAction, setAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpGestureAction

public IlpGestureAction()
Default constructor.


IlpGestureAction

public IlpGestureAction(IlpGesture g,
                        int m,
                        Action a)
Creates a new interactor action with the given configuration.

Parameters:
g - Gesture that triggers the action.
m - Gesture modifiers.
a - Action that is triggered.

Note: In the modifiers argument, InputEvent.ALT_DOWN_MASK should be used instead of InputEvent.ALT_MASK, and InputEvent.META_DOWN_MASK should be used instead of InputEvent.META_MASK, because the values of ALT_MASK/BUTTON2_MASK and META_MASK/BUTTON3_MASK overlap.

Method Detail

setGesture

public void setGesture(IlpGesture g)
Defines the gesture that is recognized by the interactor to trigger an action.

Parameters:
g - Gesture information.
See Also:
IlpGesture

getGesture

public IlpGesture getGesture()
Returns the gesture that is recognized by the interactor to trigger an action.

Returns:
Gesture configuration.
See Also:
IlpGesture

setModifiers

public void setModifiers(int modifiers)
Defines modifiers that are used together with the gesture to define when an action should be triggered.

Note: In the modifiers argument, InputEvent.ALT_DOWN_MASK should be used instead of InputEvent.ALT_MASK, and InputEvent.META_DOWN_MASK should be used instead of InputEvent.META_MASK, because the values of ALT_MASK/BUTTON2_MASK and META_MASK/BUTTON3_MASK overlap.

The following modifiers are accepted by gesture actions:

Parameters:
modifiers - Gesture modifiers.

getModifiers

public int getModifiers()
Returns the modifiers applied to the gesture in order to trigger an action.

Returns:
Gesture modifiers.

getModifiersEx

public int getModifiersEx()
Returns the modifiers as defined since JDK 1.4 using XXX_DOWN_MASK elements.

Returns:
Gesture modifiers.
Since:
JViews 7.5


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