Class Index | File Index

Classes


Class JSUTILS.EventDispatcher

The EventDispatcher class mimics the DOM event dispatcher model so the user can add and remove event listeners in a familiar way. Event bubbling is not available because events are dispatched in relation to state changes of physical components instead of layered graphics so there is nothing to bubble up.

Defined in: EventDispatcher.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
An DOM-like or as3-like EventDispatcher class.
Method Summary
Method Attributes Method Name and Description
 
addEventListener(type, listener)
Description
 
dispatchEvent(type, optionalParams)
Description
 
Description
 
removeEventListener(type, listener)
Description
Class Detail
JSUTILS.EventDispatcher(target)
An DOM-like or as3-like EventDispatcher class.
Parameters:
{Class} target
The instance of the class that implements EventDispatcher
Method Detail
addEventListener(type, listener)
Description
Parameters:
{String} type
The event type
{Function} listener
The function to be called when the event is fired

dispatchEvent(type, optionalParams)
Description
Parameters:
{Event} type
The Event object.
{Object} optionalParams
Optional parameters passed as an object. return {boolean} True if dispatch is successful, false if not.

hasEventListener(type)
Description
Parameters:
{String} type
The event type return {boolean} True is listener exists for this type, false if not.

removeEventListener(type, listener)
Description
Parameters:
{String} type
The event type
{Function} listener
The function to be called when the event is fired

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 12 2012 23:27:53 GMT-0400 (EDT)