Packagecom.ghostwire.ui.events
Classpublic class uiModelEvent
InheritanceuiModelEvent Inheritance flash.events.SyncEvent

The uiModelEvent class defines events that are dispatched by uiModel.

~ This class is available in Aspire UI Components Lite Edition ~



Public Methods
 MethodDefined by
  
uiModelEvent(type:String, changeList:Array = null)
Creates a new uiModelEvent object with the specified parameters.
uiModelEvent
Public Constants
 ConstantDefined by
  ADD : String = "add"
[static] Dispatched when one or more items have been added to the model.
uiModelEvent
  CHANGE : String = "change"
[static] Dispatched when one or more items in the model have been invalidated (modified).
uiModelEvent
  REMOVE : String = "remove"
[static] Dispatched when one or more items have been removed from the model.
uiModelEvent
  REPLACE : String = "replace"
[static] Dispatched when an item in the model has been replaced with another item.
uiModelEvent
  SORT : String = "sort"
[static] Dispatched when sorting has been performed on the items in the model.
uiModelEvent
Constructor detail
uiModelEvent()constructor
public function uiModelEvent(type:String, changeList:Array = null)

Creates a new uiModelEvent object with the specified parameters.

Parameters
type:String — The type of the event. Event listeners can access this information through the inherited type property.
 
changeList:Array (default = null) — An array of the items that were affected.
Constant detail
ADDconstant
public static const ADD:String = "add"

Dispatched when one or more items have been added to the model.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is not always the object listening for the event. Use the currentTarget property to access the object that is listening for the event.
changeListAn array that lists the items that were added.
CHANGEconstant 
public static const CHANGE:String = "change"

Dispatched when one or more items in the model have been invalidated (modified). Do remember that if you modify the contents of an item directly, you have to call invalidateItem() to ensure that the item is invalidated (and this event dispatched).

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is not always the object listening for the event. Use the currentTarget property to access the object that is listening for the event.
changeListAn array that lists the items that were modified.
REMOVEconstant 
public static const REMOVE:String = "remove"

Dispatched when one or more items have been removed from the model.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is not always the object listening for the event. Use the currentTarget property to access the object that is listening for the event.
changeListAn array that lists the items that were removed.
REPLACEconstant 
public static const REPLACE:String = "replace"

Dispatched when an item in the model has been replaced with another item.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is not always the object listening for the event. Use the currentTarget property to access the object that is listening for the event.
changeListAn array containing two elements - the first is the replaced item, the second is the new item.
SORTconstant 
public static const SORT:String = "sort"

Dispatched when sorting has been performed on the items in the model. This event is also dispatched if two items in the model have swapped positions as a result of the swapItems() method.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is not always the object listening for the event. Use the currentTarget property to access the object that is listening for the event.
changeListAn array that lists all the items affected by the sort function. In the case where this event is dispatched as a result of sort() or sortOn(), the array contains all the items in the model (we assume all items have been affected). In the case where this event is dispatched as a result of swapItems(), the array contains the two items that have swapped positions.