public class IlpDefaultObjectInteractor extends IlpAbstractInteractor implements IlpObjectInteractor
IlpObjectInteractor
.
Translates atomic input events into Swing action invocations in a given context, recognizing higher-level gestures when applicable, and invoking the associated Swing actions.
When an action is triggered by an object interactor, the action
event received by the action is an object action event IlpObjectActionEvent
.
Note: The object interactor is stateless. It uses an
IlpObjectInteractionContext
to store information about
an object. This interaction context must be given when calling
processEvent(ilog.cpl.interactor.IlpInteractionContext, java.awt.AWTEvent)
.
IlpObjectInteractor
,
IlpAbstractInteractor
,
IlpObjectInteractionContext
,
IlpObjectActionEvent
Constructor and Description |
---|
IlpDefaultObjectInteractor()
Creates a default object interactor.
|
Modifier and Type | Method and Description |
---|---|
protected ActionEvent |
createActionEvent(IlpInteractionContext ctxt,
IlpInteractionState state,
int modifiers)
Deprecated.
Please use
IlpActionEventFactory instead. |
static IlpActionEventFactory |
GetDefaultActionEventFactory()
Returns the action event factory that is used by default in this
object interactor.
|
protected IlpInteractionState |
getInteractionState(IlpInteractionContext ctxt)
Looks up the interaction state corresponding to the given context.
|
boolean |
processEvent(IlpInteractionContext ctxt,
AWTEvent event)
Processes the events applying to the object this interactor is attached to.
|
createActionEvent, delegateEvent, displayPopupMenu, getAction, getAction, getActionEventFactory, getGestureAction, getGestureAction, getGestureButton, getGestureModifiers, getKeyStrokeAction, getPopupMenuFactory, isSelectable, manageSelection, processGesture, processKeyEvent, processMouseOrFocusEvent, setAction, setAction, setActionEventFactory, setGestureAction, setGestureAction, setKeyStrokeAction, setPopupMenuFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGestureAction, getGestureAction, getGestureButton, getGestureModifiers, getKeyStrokeAction, getPopupMenuFactory, setGestureAction, setGestureAction, setKeyStrokeAction, setPopupMenuFactory
public IlpDefaultObjectInteractor()
public static IlpActionEventFactory GetDefaultActionEventFactory()
The default action event factory creates
IlpObjectActionEvent
events.
IlpObjectActionEvent
protected IlpInteractionState getInteractionState(IlpInteractionContext ctxt)
getInteractionState
in class IlpAbstractInteractor
ctxt
- The context where the event occurred.public boolean processEvent(IlpInteractionContext ctxt, AWTEvent event)
processEvent
in interface IlpInteractor
processEvent
in class IlpAbstractInteractor
ctxt
- The object interaction context used to store information
about a particular object between successive calls to this method.event
- The event which occurred over the object this interactor
is attached to.IllegalArgumentException
- if the given context is not instance of
IlpObjectInteractionContext
.IlpAbstractInteractor.processKeyEvent(ilog.cpl.interactor.IlpInteractionContext, java.awt.event.KeyEvent)
,
IlpAbstractInteractor.delegateEvent(ilog.cpl.interactor.IlpInteractionContext, java.awt.event.MouseEvent)
,
IlpAbstractInteractor.displayPopupMenu(ilog.cpl.interactor.IlpInteractionContext, java.awt.event.MouseEvent)
,
IlpAbstractInteractor.processMouseOrFocusEvent(ilog.cpl.interactor.IlpInteractionContext, java.awt.AWTEvent)
,
IlpInteractionContext
@Deprecated protected ActionEvent createActionEvent(IlpInteractionContext ctxt, IlpInteractionState state, int modifiers)
IlpActionEventFactory
instead.ActionEvent
.
Redefined to provide an IlpObjectActionEvent
instance.createActionEvent
in class IlpAbstractInteractor
ctxt
- The context where the event occurred.state
- The interaction's state.modifiers
- The modifiers associated with the recognized gesture.IlpAbstractInteractor.setActionEventFactory(ilog.cpl.interactor.IlpActionEventFactory)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.