Class M.EventDispatcher
Extends
M.Object.
Object for dispatching all incoming events.
Defined in: event_dispatcher.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Saves the latest on click event to make sure that there are no multiple events
fired for one click.
|
|
The type of this object.
|
Method Attributes | Method Name and Description |
---|---|
callHandler(handler, event, passEvent, parameters)
This method is used to explicitly call an event handler.
|
|
checkEventSource(eventSource)
This method is used to check the event source.
|
|
checkHandler(handler, type)
This method is used to check the handler.
|
|
getEventSource(eventSource)
This method is used to get the event source as a DOM object.
|
|
registerEvent(type, eventSource, handler, recommendedEvents, sourceType, isInternalCall)
This method is used to register a certain event for a certain view or DOM object
and link them to a corresponding action.
|
|
registerEvents(eventSource, events, recommendedEvents, sourceType)
This method is used to register events and link them to a corresponding action.
|
|
unregisterEvent(type, eventSource)
This method can be used to unregister events.
|
|
unregisterEvents(eventSource)
This method can be used to unregister events.
|
Field Detail
lastEvent
Saves the latest on click event to make sure that there are no multiple events
fired for one click.
{String}
type
The type of this object.
Method Detail
callHandler(handler, event, passEvent, parameters)
This method is used to explicitly call an event handler. We mainly use this for
combining internal and external events.
- Parameters:
- {Object} handler
- The handler for the event.
- {Object} event
- The original DOM event.
- {Boolean} passEvent
- Determines whether or not to pass the event and its target as the first parameters for the handler call.
- {Array} parameters
- The (additional) parameters for the handler call.
{Boolean}
checkEventSource(eventSource)
This method is used to check the event source. It tests if it is correctly
specified.
- Parameters:
- {Object} eventSource
- The event source.
- Returns:
- {Boolean} Specifies whether or not the check was successful.
{Boolean}
checkHandler(handler, type)
This method is used to check the handler. It tests if target and action are
specified correctly.
- Parameters:
- {Object} handler
- The handler for the event.
- {String} type
- The type of the event.
- Returns:
- {Boolean} Specifies whether or not the check was successful.
{Object}
getEventSource(eventSource)
This method is used to get the event source as a DOM object.
- Parameters:
- {Object|String} eventSource
- The event source.
- Returns:
- {Object} The event source as dom object.
registerEvent(type, eventSource, handler, recommendedEvents, sourceType, isInternalCall)
This method is used to register a certain event for a certain view or DOM object
and link them to a corresponding action.
- Parameters:
- {String} type
- The type of the event.
- {String|Object} eventSource
- The view's id, the view object or a DOM object.
- {Object} handler
- The handler for the event.
- {Object} recommendedEvents
- The recommended events for this event source.
- {Object} sourceType
- The type of the event source.
- {Boolean} isInternalCall
- The flag to determine whether this is an internal call or not.
registerEvents(eventSource, events, recommendedEvents, sourceType)
This method is used to register events and link them to a corresponding action.
- Parameters:
- {String|Object} eventSource
- The view's id or a DOM object.
- {Object} events
- The events to be registered for the given view or DOM object.
- recommendedEvents
- sourceType
unregisterEvent(type, eventSource)
This method can be used to unregister events.
- Parameters:
- {String} type
- The type of the event.
- {String|Object} eventSource
- The view's id, the view object or a DOM object.
unregisterEvents(eventSource)
This method can be used to unregister events.
- Parameters:
- {String|Object} eventSource
- The view's id, the view object or a DOM object.