Packageorg.igniterealtime.xiff.collections.events
Classpublic class CollectionEvent
InheritanceCollectionEvent Inheritance flash.events.Event

The CollectionEvent class represents an event that is dispatched when the associated collection changes.



Public Properties
 PropertyDefined by
  items : Array
When the kind is CollectionEventKind.ADD or CollectionEventKind.REMOVE the items property is an Array of added/removed items.
CollectionEvent
  kind : String
Indicates the kind of event that occurred.
CollectionEvent
  location : int
When the kind value is CollectionEventKind.ADD, CollectionEventKind.MOVE, CollectionEventKind.REMOVE, or CollectionEventKind.REPLACE, this property is the zero-base index in the collection of the item(s) specified in the items property.
CollectionEvent
  oldLocation : int
When the kind value is CollectionEventKind.MOVE, this property is the zero-based index in the target collection of the previous location of the item(s) specified by the items property.
CollectionEvent
Public Methods
 MethodDefined by
  
CollectionEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, kind:String = null, location:int = -1, oldLocation:int = -1, items:Array = null)
Constructor.
CollectionEvent
Public Constants
 ConstantDefined by
  COLLECTION_CHANGE : String = "collectionChange"
[static] The CollectionEvent.COLLECTION_CHANGE constant defines the value of the type property of the event object for an event that is dispatched when a collection has changed.
CollectionEvent
Property detail
itemsproperty
public var items:Array

When the kind is CollectionEventKind.ADD or CollectionEventKind.REMOVE the items property is an Array of added/removed items. When the kind is CollectionEventKind.REPLACE or CollectionEventKind.UPDATE the items property is an Array of PropertyChangeEvent objects with information about the items affected by the event. When a value changes, query the newValue and oldValue fields of the PropertyChangeEvent objects to find out what the old and new values were. When the kind is CollectionEventKind.REFRESH or CollectionEventKind.RESET, this array has zero length.

kindproperty 
public var kind:String

Indicates the kind of event that occurred.

locationproperty 
public var location:int

When the kind value is CollectionEventKind.ADD, CollectionEventKind.MOVE, CollectionEventKind.REMOVE, or CollectionEventKind.REPLACE, this property is the zero-base index in the collection of the item(s) specified in the items property.

oldLocationproperty 
public var oldLocation:int

When the kind value is CollectionEventKind.MOVE, this property is the zero-based index in the target collection of the previous location of the item(s) specified by the items property.

Constructor detail
CollectionEvent()constructor
public function CollectionEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, kind:String = null, location:int = -1, oldLocation:int = -1, items:Array = null)

Constructor.

Parameters
type:String
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
 
kind:String (default = null)
 
location:int (default = -1)
 
oldLocation:int (default = -1)
 
items:Array (default = null)
Constant detail
COLLECTION_CHANGEconstant
public static const COLLECTION_CHANGE:String = "collectionChange"

The CollectionEvent.COLLECTION_CHANGE constant defines the value of the type property of the event object for an event that is dispatched when a collection has changed.