Class Index | File Index

Classes


Class zwt.model.ModelEventManager


Extends zwt.event.EventManager.

A model event manager is used by a model to process model events and dispatch them to the appropriate handlers.

Handlers are methods previously registered on the event manager to handle a specific type of event. A typical handler method has two input parameters: the object that triggered the event and the event. An optional object argument may also be passed to the handler if it was provided when dispatching the event to the event manager (see zwt.event.EventManager#onEvent).


Defined in: ModelEventManager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
zwt.model.ModelEventManager(zwt_model_Model_model)
Construct a model event manager and attach it to the specified model.
Method Summary
Method Attributes Method Name and Description
 
addNotifyHandler(function_handler)
Add a model notify handler.
 
onEvent(zwt_model_ModelEvent_event, zwt_model_Model_overrideModel, object_arg)
Dispatch the specified model event to the appropriate handlers.
 
removeNotifyHandler(function_handler)
Remove a model notify handler.
Methods borrowed from class zwt.event.EventManager:
addHandler, addHandlers, removeHandler, removeHandlers
Class Detail
zwt.model.ModelEventManager(zwt_model_Model_model)
Construct a model event manager and attach it to the specified model.
Author: Jeremy KUHN.
Parameters:
{zwt.model.Model} zwt_model_Model_model
The model to monitor
See:
zwt.model.ModelEvent
Method Detail
addNotifyHandler(function_handler)
Add a model notify handler.
Parameters:
{Function} function_handler
The handler to add

onEvent(zwt_model_ModelEvent_event, zwt_model_Model_overrideModel, object_arg)
Dispatch the specified model event to the appropriate handlers.
Parameters:
{zwt.model.ModelEvent} zwt_model_ModelEvent_event
The event to dispatch
{zwt.model.Model} zwt_model_Model_overrideModel
If set it overrides the model object passed to the handlers which is the model managed by the event manager by default
{zwt.Object} object_arg
An optional object to pass to the handler method

removeNotifyHandler(function_handler)
Remove a model notify handler.
Parameters:
{Function} function_handler
The handler to add

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jan 12 2012 02:07:53 GMT+0100 (CET)