ilog.cpl.interactor
Interface IlpInteractor

All Known Subinterfaces:
IlpObjectInteractor, IlpViewInteractor
All Known Implementing Classes:
IlpAbstractInteractor, IlpDefaultObjectInteractor, IlpDefaultTableHeaderInteractor, IlpDefaultTableViewInteractor, IlpDefaultViewInteractor, IlpEditEquipmentObjectInteractor, IlpEditEquipmentObjectInteractor, IlpGraphEditEquipmentObjectInteractor, IlpViewsViewInteractor

public interface IlpInteractor

Translates atomic input events into Swing action invocations in a given context, recognizing higher-level gestures when applicable, and invoking the associated Swing actions.

Since:
JTGO 3.0

Method Summary
 Action getGestureAction(IlpGesture gesture)
          Returns the customized action associated with the given gesture, 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 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.
 

Method Detail

getPopupMenuFactory

IlpPopupMenuFactory getPopupMenuFactory()
Returns the pop-up menu factory used to create a pop-up menu with this interactor, if any.

Returns:
The pop-up menu factory used to create a pop-up menu.

setPopupMenuFactory

void setPopupMenuFactory(IlpPopupMenuFactory factory)
Sets the pop-up menu factory to be used to create a pop-up menu with this interactor.

Parameters:
factory - The factory to be used. If this parameter equals null, no pop-up menu will be displayed.

getGestureAction

Action getGestureAction(IlpGesture gesture)
Returns the customized action associated with the given gesture, if any.

Parameters:
gesture - The gesture whose action is required.

setGestureAction

void setGestureAction(IlpGesture gesture,
                      Action action)
Associates an action with the specified gesture.

Parameters:
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.
Throws:
IllegalArgumentException - if the specified gesture equals null.

getGestureButton

int getGestureButton(IlpGesture gesture)
Returns the mouse button that triggers the specified gesture. Modifications should be implemented by redefining this method. Basic gestures do not use this method since they implicitly involve a button (BUTTON1_CLICKED, for instance).

Parameters:
gesture - The gesture concerned.

getGestureModifiers

int getGestureModifiers(IlpGesture gesture)
Returns the keyboard modifiers that trigger the specified gesture. Modifications should be implemented by redefining this method.

Parameters:
gesture - The gesture concerned.

getKeyStrokeAction

Action getKeyStrokeAction(KeyStroke keyStroke)
Returns the customized action associated with the specified keystroke, if any.

Parameters:
keyStroke - The keystroke whose action is required.

setKeyStrokeAction

void setKeyStrokeAction(KeyStroke keyStroke,
                        Action action)
Associates an action with the given keystroke.

Parameters:
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.
Throws:
IllegalArgumentException - if the specified keystroke equals null.

processEvent

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.

Parameters:
context - The interaction context used to store information between two calls to this method.
event - The event that occurred on the view.


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