Echo.Update
ComponentUpdate
Class Hierarchy:

Representation of an update to a single existing component which is currently rendered on the screen.

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

Class Method Summary
Public PropertyUpdate()
Data object representing the old and new states of a changed property.

Instance Method Summary
Internal _addChild()
Records the addition of a child to the parent component.
Internal _appendRemovedDescendants()
Appends removed children and descendants from another update to this update as removed descendants.
Public getAddedChildren()
Returns an array containing the children added in this update, or null if none were added.
Public getRemovedChildren()
Returns an array containing the children removed in this update, or null if none were removed.
Public getRemovedDescendants()
Returns an array containing the descendants of any children removed in this update, or null if none were removed.
Public getUpdatedLayoutDataChildren()
Returns an array containing the children of this component whose LayoutDatas have changed in this update, or null if no such changes were made.
Public hasAddedChildren()
Determines if any children were added during this update.
Public hasRemovedChildren()
Determines if any children were removed during this update.
Public hasUpdatedLayoutDataChildren()
Determines if any children had their LayoutData changed during this update.
Public hasUpdatedProperties()
Determines if this update has any changed properties.
Public getUpdatedProperty()
Returns a PropertyUpdate describing an update to the property with the given name.
Public isListenerTypeUpdated()
Determines if any listeners of a specific type were added or removed from the component.
Public getUpdatedPropertyNames()
Returns the names of all properties being updated in this update.
Public hasUpdatedPropertyIn()
Determines if any of the specified properties has been updated in this update.
Public isUpdatedPropertySetIn()
Determines if the set of updated property names is contained within the specified set.
Internal _removeChild()
Records the removal of a child from the parent component.
Internal _removeDescendant()
Records the removal of a descendant of the parent component.
Public toString()
Returns a string representation.
Internal _updateLayoutData()
Records the update of the LayoutData of a child component.
Internal _updateListener()
Records the addition or removal of listeners to the parent component.
Internal _updateProperty()
Records the update of a property of the parent component.

Constructor Detail
Echo.Update.ComponentUpdate()
Creates a new ComponentUpdate.
Parameters:
parent (Echo.Component) - the updated component

Class Method Detail
PropertyUpdate
Data object representing the old and new states of a changed property.
Parameters:
oldValue - the old value of the property
newValue - the new value of the property

Instance Method Detail
_addChild
Records the addition of a child to the parent component.
Parameters:
child (Echo.Component) - the added child

_appendRemovedDescendants
Appends removed children and descendants from another update to this update as removed descendants. This method is invoked when a component is removed that is an ancestor of a component that has an update in the update manager.
Parameters:
update (Echo.Update.CompoentUpdate) - the update from which to pull removed components/descendants

getAddedChildren
Returns an array containing the children added in this update, or null if none were added.
Returns:
(Array) the added children

getRemovedChildren
Returns an array containing the children removed in this update, or null if none were removed.
Returns:
(Array) the removed children

getRemovedDescendants
Returns an array containing the descendants of any children removed in this update, or null if none were removed. The removed children themselves are not returned by this method.
Returns:
(Array) the removed descendants

getUpdatedLayoutDataChildren
Returns an array containing the children of this component whose LayoutDatas have changed in this update, or null if no such changes were made.
Returns:
(Array) the updated layout data children

hasAddedChildren
Determines if any children were added during this update.
Returns:
(Boolean) true if any children were added

hasRemovedChildren
Determines if any children were removed during this update.
Returns:
(Boolean) true if any children were removed

hasUpdatedLayoutDataChildren
Determines if any children had their LayoutData changed during this update.
Returns:
(Boolean) true if any children had their LayoutData changed

hasUpdatedProperties
Determines if this update has any changed properties.
Returns:
(Boolean) true if properties are being updated

getUpdatedProperty
Returns a PropertyUpdate describing an update to the property with the given name.
Parameters:
name - the name of the property being updated
Returns:
(Echo.Update.ComponentUpdate.PropertyUpdate) the PropertyUpdate, or null if none exists

isListenerTypeUpdated
Determines if any listeners of a specific type were added or removed from the component.
Parameters:
listenerType (String) - the type of listener to query

getUpdatedPropertyNames
Returns the names of all properties being updated in this update.
Returns:
(Array) the names of all updated properties, if no properties are updated an empty array is returned

hasUpdatedPropertyIn
Determines if any of the specified properties has been updated in this update. The provided object should have have keys for the desired property names and values that evaluate to true, e.g. to determine if either the "text" and/or "icon" properties changed, specify {text: true, icon: true}.
Parameters:
updatedPropertySet - the updated property set
Returns:
(Boolean) true if any of the specified properties has been updated in this update

isUpdatedPropertySetIn
Determines if the set of updated property names is contained within the specified set. The provided object should have have keys for the desired property names and values that evaluate to true, e.g. to determine if no properties other than "text" and "icon" changed, specify {text: true, icon: true}.
Parameters:
updatedPropertySet - the updated property set
Returns:
(Boolean) true if the set of updated property names is contained within the specified set

_removeChild
Records the removal of a child from the parent component.
Parameters:
child (Echo.Component) - the removed child

_removeDescendant
Records the removal of a descendant of the parent component. All children of a removed component are recorded as removed descendants when the child is removed. This method will recursively invoke itself on children of the specified descendant.
Parameters:
descendant (Echo.Component) - the removed descendant

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

_updateLayoutData
Records the update of the LayoutData of a child component.
Parameters:
child (Echo.Component) - the child component whose layout data was updated

_updateListener
Records the addition or removal of listeners to the parent component.
Parameters:
listenerType (String) - the listener type

_updateProperty
Records the update of a property of the parent component.
Parameters:
propertyName (String) - the name of the property
oldValue - the previous value of the property
newValue - the new value of the property