Class IWEventManager

A class used to register, trigger and remove events on both DOM and Javascript objects. Uses the singleton design pattern. To enforce one single instance we use an anonymous constructor.


Constructor Summary
IWEventManager()
           
 
Method Summary
 IWEventListener addCustomListener(obj, eventName, eventHandler)
           Registers a handler for the given custom event name and object.
 IWEventListener addDomListener(obj, eventName, eventHandler)
           Registers a handler for the given DOM event name and object. If possible the W3C or Microsoft syntax for attaching events will be used, otherwise an IW event handler is registered.
 IWEventListener addListener(obj, eventName, eventHandler)
           Registers a handler for the given event name and object.

This method is deprecated, use addDomListener in case of a DOM event or addCustomListener otherwise.

 IWEventListener bind(obj, eventName, listenerObj, eventHandler)
           Registers a method from an object as handler for events of the specified type from another object.
 void clearInstanceListeners(obj)
           Removes all registered handlers for the given object.
 void clearListeners(obj, eventName)
           Removes all handlers for the specified event type and object.
 void removeListener(eventListener)
           Removes the handler determined by the specified reference.
 void trigger(object, eventName, event)
           Triggers the event on the given object.
 
Constructor Detail

IWEventManager

IWEventManager()

Method Detail

addCustomListener

IWEventListener addCustomListener(obj, eventName, eventHandler)

addDomListener

IWEventListener addDomListener(obj, eventName, eventHandler)

addListener

IWEventListener addListener(obj, eventName, eventHandler)

bind

IWEventListener bind(obj, eventName, listenerObj, eventHandler)

clearInstanceListeners

void clearInstanceListeners(obj)

clearListeners

void clearListeners(obj, eventName)

removeListener

void removeListener(eventListener)

trigger

void trigger(object, eventName, event)

Source-Code Copyright 2007-2016 infoware GmbH - Documentation generated on Tue Nov 29 2022 14:20:15 GMT+0100 (MEZ)