Class zwt.event.UIEvent
Extends
zwt.event.Event.
This is the base class of all UI event classes.
Defined in: UIEvent.js.
Constructor Attributes | Constructor Name and Description |
---|---|
zwt.event.UIEvent(event, zwt_ui_Widget_widget, int_type, boolean_propagate)
Construct a UI event.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
zwt.event.UIEvent.UNKNOWN
Constant used to indicate an unknown event
|
Method Attributes | Method Name and Description |
---|---|
Return the underlying browser event.
|
|
Return the element targeted by the underlying browser event.
|
|
Return the return flag to be returned by the event dispatch method.
|
|
Return the Widget linked to the event.
|
|
setReturn(boolean_return)
Set the return flag that will be returned to the browser by the dispatch method (default is true).
|
- Methods borrowed from class zwt.event.Event:
- getType, isCancelBubble, setCancelBubble, touch
Class Detail
zwt.event.UIEvent(event, zwt_ui_Widget_widget, int_type, boolean_propagate)
Construct a UI event.
Author: Jeremy KUHN.
Author: Jeremy KUHN.
- Parameters:
- {Event} event
- A JavaScript event object
- {zwt.ui.Widget} zwt_ui_Widget_widget
- The widget linked to the event
- {Integer} int_type
- The event type
- {Boolean} boolean_propagate
- Indicate whether this event should propagate the underlying browser event to the parent elements (which is the normal behavior for JavaScript event). UI events should always stop the propagation as event propagation should always be handled by the framework. This parameter is set to false by default.
Field Detail
<static>
{Integer}
zwt.event.UIEvent.UNKNOWN
Constant used to indicate an unknown event
Method Detail
{Event}
getBrowserEvent()
Return the underlying browser event.
In case a user interaction is not the origin of the event, this method returns null.
- Returns:
- The browser event or null
{Event}
getBrowserEventTarget()
Return the element targeted by the underlying browser event.
In case a user interaction is not the origin of the event, this method returns null.
- Returns:
- The targeted element or null
{Boolean}
getReturn()
Return the return flag to be returned by the event dispatch method.
- Returns:
- the return flag
{zwt.ui.Widget}
getWidget()
Return the Widget linked to the event.
- Returns:
- The widget
setReturn(boolean_return)
Set the return flag that will be returned to the browser by the dispatch method (default is true).
- Parameters:
- {Boolean} boolean_return