© 2014, Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and or/its affiliates and/or their licensors.
Generated by JsDoc Toolkit 2.3.2

Class Presto .Observable

A base class that supports publishing events to observer classes.

Class Summary
Constructor AttributesConstructor Name and Description
 
Method Summary
Method AttributesMethod Name and Description
 
addEvents(events)

Adds one or more named events for this observable.

 
addListener(eventName, handler, scope)

Registers a listener for the specified event for an observer of this class.

 
fireEvent(eventName)

Fires the specified event, notifying all listeners registered for this event.

 
hasEvent(eventName)

Determines if the specified event exists on the current object and returns a boolean.

 
removeListener(eventName, fn)

Removes the specified listener.

Class Detail
Presto.Observable(events)
Parameters:
{Object} events
An object with event names for this observable.
Method Detail
addEvents(events)

Adds one or more named events for this observable.

Parameters:
{Object} events
An object with event names to add to this observable.
addListener(eventName, handler, scope)

Registers a listener for the specified event for an observer of this class.

Parameters:
{String} eventName
The name of the event this listener is interested in.
{Function} handler
The oberver's handler function to notify for this type of event.
{Object} scope
The scope in which the handler should be called.
fireEvent(eventName)

Fires the specified event, notifying all listeners registered for this event. Any additional parameters specified in this call are passed to listeners.

Parameters:
{String} eventName
The name of the event to fire.
hasEvent(eventName)

Determines if the specified event exists on the current object and returns a boolean.

Parameters:
{String} eventName
The event name to check for.
removeListener(eventName, fn)

Removes the specified listener.

Parameters:
{String} eventName
The name of the event for this listener.
{Function} fn
The handler function for the listener to remove.