public interface IlpInteractor
Modifier and Type | Method and Description |
---|---|
Action |
getGestureAction(IlpGesture gesture)
Returns the customized action associated with the given gesture, if any.
|
Action |
getGestureAction(IlpGesture gesture,
int modifier)
Returns the customized action associated with the given gesture and
modifiers, if any.
|
int |
getGestureButton(IlpGesture gesture)
Returns the mouse button that triggers the specified gesture.
|
int |
getGestureModifiers(IlpGesture gesture)
Returns the keyboard modifiers that trigger the specified gesture.
|
Action |
getKeyStrokeAction(KeyStroke keyStroke)
Returns the customized action associated with the specified keystroke, if any.
|
IlpPopupMenuFactory |
getPopupMenuFactory()
Returns the pop-up menu factory used to create a pop-up menu with
this interactor, if any.
|
boolean |
processEvent(IlpInteractionContext context,
AWTEvent event)
Manages the events occurring on a view, translating atomic input events
into Swing action invocations
in a given context, recognizing higher-level gestures when applicable,
and invoking the associated Swing actions.
|
void |
setGestureAction(IlpGesture gesture,
Action action)
Associates an action with the specified gesture.
|
void |
setGestureAction(IlpGesture gesture,
int modifier,
Action action)
Associates an action with a specified gesture and modifier.
|
void |
setKeyStrokeAction(KeyStroke keyStroke,
Action action)
Associates an action with the given keystroke.
|
void |
setPopupMenuFactory(IlpPopupMenuFactory factory)
Sets the pop-up menu factory to be used to create a pop-up menu with this
interactor.
|
IlpPopupMenuFactory getPopupMenuFactory()
void setPopupMenuFactory(IlpPopupMenuFactory factory)
factory
- The factory to be used.
If this parameter equals null
, no pop-up menu will be displayed.Action getGestureAction(IlpGesture gesture)
gesture
- The gesture whose action is required.void setGestureAction(IlpGesture gesture, Action action)
gesture
- The gesture which triggers an action.action
- The action to be triggered by the specified gesture.
If this parameter equals null
, the specified gesture triggers no
action.IllegalArgumentException
- if the specified gesture equals
null
.Action getGestureAction(IlpGesture gesture, int modifier)
gesture
- The gesture whose action is required.modifier
- The modifier for the gesture
(as defined in InputEvent
).void setGestureAction(IlpGesture gesture, int modifier, Action action)
gesture
- The gesture which triggers an action in conjunction
with the modifier.modifier
- The modifier that should be combined with the gesture
to trigger an action (as defined in InputEvent
).action
- The action to be triggered by the specified gesture
and modifier. If this parameter equals null
,
the specified gesture triggers no action.IllegalArgumentException
- If the specified gesture equals
null
.int getGestureButton(IlpGesture gesture)
BUTTON1_CLICKED
, for instance).gesture
- The gesture concerned.int getGestureModifiers(IlpGesture gesture)
gesture
- The gesture concerned.Action getKeyStrokeAction(KeyStroke keyStroke)
keyStroke
- The keystroke whose action is required.void setKeyStrokeAction(KeyStroke keyStroke, Action action)
keyStroke
- The keystroke which triggers an action.action
- The action to be triggered by the specified keystroke.
If this parameter equals null
, the keystroke triggers no action.IllegalArgumentException
- if the specified keystroke equals
null
.boolean processEvent(IlpInteractionContext context, AWTEvent event)
context
- The interaction context used to store information between
two calls to this method.event
- The event that occurred on the view.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.