|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.interactor.IlpInteractorAction
ilog.cpl.interactor.IlpGestureAction
public class IlpGestureAction
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:
IlpGesture) that is
recognized by the interactor.
Note that 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.
Action) that specifies the operation
to be performed once the gesture is recognized.
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';
}
| 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 |
|---|
public IlpGestureAction()
public IlpGestureAction(IlpGesture g,
int m,
Action a)
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 |
|---|
public void setGesture(IlpGesture g)
g - Gesture information.IlpGesturepublic IlpGesture getGesture()
IlpGesturepublic void setModifiers(int modifiers)
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:
InputEvent.ALT_DOWN_MASK
InputEvent.ALT_GRAPH_DOWN_MASK
InputEvent.CTRL_DOWN_MASK
InputEvent.META_DOWN_MASK
modifiers - Gesture modifiers.public int getModifiers()
public int getModifiersEx()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||