Class zwt.event.UIEventManager
Extends
zwt.event.EventManager.
This is the base class of all UI event manager. A UI event manager is used by a widget to process UI events and dispatch them to the appropriate handlers.
A UI event manager is responsible to catch the event emitted by the elements registered with zwt.event.UIEventManager#registerElement, create the corresponding zwt.event.Event and dispatch it to the managed object using its onEvent
method. The managed object can then process the event and decide whether it has to be dispatch to the handlers registered in the event manager using zwt.event.EventManager#onEvent.
Handlers are methods previously registered on the event manager to handle a specific type of event. A typical handler method has two input parameters: the object that triggered the event and the event.
Defined in: UIEventManager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
zwt.event.UIEventManager(zwt_ui_Widget_widget)
Construct a UI event manager and attach it to the specified widget.
|
Method Attributes | Method Name and Description |
---|---|
finalizeEventHandling(Event_event, zwt_event_Event_event)
A utility method that finalizes the processing of event.
|
|
registerElement(Element_callbackElement)
Register the specified element into the event manager.
|
- Methods borrowed from class zwt.event.EventManager:
- addHandler, addHandlers, onEvent, removeHandler, removeHandlers
Author: Jeremy KUHN.
- Parameters:
- {zwt.ui.Widget} zwt_ui_Widget_widget
- The widget to monitor
- See:
- zwt.event.UIEvent
It first dispatches the zwt.event.Event to the object managed by the event manager and finalizes the browser event based on what is set in the zwt.event.Event (zwt.event.Event#getReturn).
This method should be used in UI event manager implementation to finalize events.
- Parameters:
- {Event} Event_event
- The original browser event catch by the event manager
- {zwt.event.Event} zwt_event_Event_event
- The zwt.event.Event created by the event manager to be dispatched to the managed object.
The event manager will catch the UI event emitted by the element and dispatch them to the handlers.
- Parameters:
- {Element} Element_callbackElement
- The element to register.