public class IlpKeyStrokeAction extends IlpInteractorAction
A key stroke action is defined by the following attributes:
KeyStroke) that is recognized
by the interactor.
Action) that specifies the operation
to be performed once the keystroke is recognized.
This class provides support to define interactors using a CSS, as follows:
Interactor {
viewInteractor: @+viewInt;
}
Subobject#viewInt {
class: 'ilog.cpl.interactor.IlpDefaultViewInteractor';
action[0]: @+keyAction0;
}
Subobject#keyAction0 {
class: 'ilog.cpl.interactor.IlpKeyStrokeAction';
keyStroke: 'typed a';
action: @+action0;
}
Subobject#action0 {
class: 'mypackage.myActionClass';
}
| Constructor and Description |
|---|
IlpKeyStrokeAction()
Default constructor.
|
IlpKeyStrokeAction(KeyStroke k,
Action a)
Creates a new interactor action with the given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
KeyStroke |
getKeyStroke()
Returns the key stroke that triggers an action in the interactor.
|
void |
setKeyStroke(KeyStroke k)
Defines a key stroke which is used to trigger an action.
|
getAction, setActionpublic void setKeyStroke(KeyStroke k)
KeyStroke.getKeyStroke(java.lang.String)k - Key stroke.KeyStroke© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.