Echo.Update
Manager
Class Hierarchy:

Monitors and records updates made to the application between repaints. Provides API to determine changes to component hierarchy since last update in order to efficiently repaint the screen.

Constructor Summary
Public Echo.Update.Manager()
Creates a new Update Manager.

Instance Field Summary
Internal _componentUpdateMap
Associative mapping between component ids and Echo.
Public fullRefreshRequired
Flag indicating whether a full refresh or incremental update will be performed.
Public application
The application whose updates are being managed.
Internal _hasUpdates
Flag indicating whether any updates are pending.
Internal _listenerList
Internal listener list for update listeners.
Internal _idMap
Associative mapping between component ids and component instances for all updates held in this manager object.
Internal _removedIdMap
Associative mapping from the ids of components which are to be removed in this update to the components themselves.
Internal _lastAncestorTestParentId
The id of the last parent component whose child was analyzed by _isAncestorBeingAdded() that resulted in that method returning false.

Instance Method Summary
Public addUpdateListener()
Adds a listener to receive notification of update events.
Internal _createComponentUpdate()
Creates a new ComponentUpdate object (or returns an existing one) for a specific parent component.
Public dispose()
Permanently disposes of the Update Manager, freeing any resources.
Internal _fireUpdate()
Notifies update listeners of an event.
Public getUpdates()
Returns the current pending updates.
Public hasUpdates()
Determines if any updates exist in the Update Manager.
Internal _isAncestorBeingAdded()
Determines if an ancestor of the specified component is being added.
Internal _processComponentAdd()
Processes a child addition to a component.
Internal _processComponentLayoutDataUpdate()
Process a layout data update to a child component.
Internal _processComponentListenerUpdate()
Process a layout data update to a child component.
Internal _processComponentRemove()
Processes a child removal from a component.
Internal _processComponentPropertyUpdate()
Processes a property update to a component.
Internal _processFullRefresh()
Processes an event requiring a full-refresh.
Internal _processComponentUpdate()
Processes component update notification received from the application instance.
Public purge()
Purges all updates from the manager.
Public removeUpdateListener()
Removes a listener from receiving notification of update events.
Public toString()
Returns a string representation.

Constructor Detail
Echo.Update.Manager()
Creates a new Update Manager.
Parameters:
application (Echo.Application) - the supported application

Instance Method Detail
addUpdateListener
Adds a listener to receive notification of update events.
Parameters:
l (Function) - the listener to add

_createComponentUpdate
Creates a new ComponentUpdate object (or returns an existing one) for a specific parent component.
Parameters:
parent (Echo.Component) - the parent Component
Returns:
(Echo.Update.ComponentUpdate) a ComponentUpdate instance for that Component

dispose
Permanently disposes of the Update Manager, freeing any resources.

_fireUpdate
Notifies update listeners of an event.

getUpdates
Returns the current pending updates. Returns null in the event that that no pending updates exist.
Returns:
(Array) an array containing all component updates (as Echo.Update.ComponentUpdates)

hasUpdates
Determines if any updates exist in the Update Manager.
Returns:
(Boolean) true if any updates are present

_isAncestorBeingAdded
Determines if an ancestor of the specified component is being added. This method must be invoked by all hierarchy modification operations.
Parameters:
component (Echo.Component) - the component to evaluate
Returns:
(Boolean) true if the component or an ancestor of the component is being added

_processComponentAdd
Processes a child addition to a component.
Parameters:
parent (Echo.Component) - the parent component
child (Echo.Component) - the added child component

_processComponentLayoutDataUpdate
Process a layout data update to a child component.
Parameters:
updatedComponent (Echo.Component) - the updated component

_processComponentListenerUpdate
Process a layout data update to a child component.
Parameters:
updatedComponent (Echo.Component) - the updated component

_processComponentRemove
Processes a child removal from a component.
Parameters:
parent (Echo.Component) - the parent component
child (Echo.Component) - the removed child component

_processComponentPropertyUpdate
Processes a property update to a component.
Parameters:
component (Echo.Component) - the updated component
propertyName (String) - the updated property name
oldValue - the previous value of the property
newValue - the new value of the property

_processFullRefresh
Processes an event requiring a full-refresh.

_processComponentUpdate
Processes component update notification received from the application instance.
Parameters:
component (Echo.Component) - the updated component
propertyName (String) - the updated property name
oldValue - the previous value of the property
newValue - the new value of the property

purge
Purges all updates from the manager. Invoked after the client has repainted the screen.

removeUpdateListener
Removes a listener from receiving notification of update events.
Parameters:
l (Function) - the listener to remove

toString
Returns a string representation.
Returns:
(String) a string representation