The Essential JViews Framework > Managers > Introducing Managers > Handling Input Events: Interactors and Accelerators

All input events are handled by means of interactors or accelerators.

Interactors

An IlvManager instance responds to user actions according to the state of the manager when a certain input event occurs, and also according to the position and shape of the object that receives the event. IlvManager actions can be either global (that is, applied to a whole view through instances of classes derived from IlvManagerViewInteractor) or local (applied to an object or a set of objects in a view through instances of classes derived from IlvObjectInteractor). The manager associates an interactor object, that is, an instance of the IlvManagerViewInteractor class, with each view. This interactor object processes events that are intended for that particular view. If the manager has not associated an interactor object with a view, then each event is handled by the interactor object associated with the graphic object that received the event. In this case, the interactor object belongs to the IlvObjectInteractor class, which manages the events for a particular object.

Accelerators

If no object is indicated when the event is received, or, if it has no associated IlvObjectInteractor, the manager tries to apply an accelerator, which is a direct call of a user-defined action, such as the pressing of a certain key sequence. In fact, in certain situations, the best solution is to establish a generic action for all the objects associated with a single event sequence so that, for example, pressing Ctrl+Z causes the view to zoom. To do this, ILOG JViews allows you to associate direct actions with events. These actions, which are bound neither to the view nor to the object that was clicked, are called accelerators.