Packagefl.events
Classpublic class DataChangeEvent
InheritanceDataChangeEvent Inheritance flash.events.Event

The DataChangeEvent class defines the event that is dispatched when the data that is associated with a component changes. This event is used by the List, DataGrid, TileList, and ComboBox components.

This class provides the following event:

See also

DataChangeType


Public Properties
 PropertyDefined by
  changeType : String
[read-only] Gets the type of the change that triggered the event.
DataChangeEvent
  endIndex : uint
[read-only] Gets the index of the last changed item in the array of items that were changed.
DataChangeEvent
  items : Array
[read-only] Gets an array that contains the changed items.
DataChangeEvent
  startIndex : uint
[read-only] Gets the index of the first changed item in the array of items that were changed.
DataChangeEvent
Public Methods
 MethodDefined by
  
DataChangeEvent(eventType:String, changeType:String, items:Array, startIndex:int = -1, endIndex:int = -1)
Creates a new DataChangeEvent object with the specified parameters.
DataChangeEvent
  
clone():Event
Creates a copy of the DataEvent object and sets the value of each parameter to match that of the original.
DataChangeEvent
  
toString():String
Returns a string that contains all the properties of the DataChangeEvent object.
DataChangeEvent
Public Constants
 ConstantDefined by
  DATA_CHANGE : String = "dataChange"
[static] Defines the value of the type property of a dataChange event object.
DataChangeEvent
  PRE_DATA_CHANGE : String = "preDataChange"
[static] Defines the value of the type property of a preDataChange event object.
DataChangeEvent
Property detail
changeTypeproperty
changeType:String  [read-only]

Gets the type of the change that triggered the event. The DataChangeType class defines the possible values for this property.

Implementation
    public function get changeType():String

See also

endIndexproperty 
endIndex:uint  [read-only]

Gets the index of the last changed item in the array of items that were changed.

Implementation
    public function get endIndex():uint

See also

itemsproperty 
items:Array  [read-only]

Gets an array that contains the changed items.

Implementation
    public function get items():Array
startIndexproperty 
startIndex:uint  [read-only]

Gets the index of the first changed item in the array of items that were changed.

Implementation
    public function get startIndex():uint

See also

Constructor detail
DataChangeEvent()constructor
public function DataChangeEvent(eventType:String, changeType:String, items:Array, startIndex:int = -1, endIndex:int = -1)

Creates a new DataChangeEvent object with the specified parameters.

Parameters
eventType:String — The type of change event.
 
changeType:String — The type of change that was made. The DataChangeType class defines the possible values for this parameter.
 
items:Array — A list of items that were changed.
 
startIndex:int (default = -1) — The index of the first item that was changed.
 
endIndex:int (default = -1) — The index of the last item that was changed.
Method detail
clone()method
public override function clone():Event

Creates a copy of the DataEvent object and sets the value of each parameter to match that of the original.

Returns
Event — A new DataChangeEvent object with property values that match those of the original.
toString()method 
public override function toString():String

Returns a string that contains all the properties of the DataChangeEvent object. The string is in the following format:

[DataChangeEvent type=value changeType=value startIndex=value endIndex=value bubbles=value cancelable=value]

Returns
String — A string that contains all the properties of the DataChangeEvent object.
Constant detail
DATA_CHANGEconstant
public static const DATA_CHANGE:String = "dataChange"

Defines the value of the type property of a dataChange event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
changeTypeIdentifies the type of change that was made.
currentTargetThe object that is actively processing the event object with an event listener.
endIndexIdentifies the index of the last changed item.
itemsAn array that lists the items that were changed.
startIndexIdentifies the index of the first changed item.
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.

See also

PRE_DATA_CHANGEconstant 
public static const PRE_DATA_CHANGE:String = "preDataChange"

Defines the value of the type property of a preDataChange event object. This event object is dispatched before a change is made to component data.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
changeTypeIdentifies the type of change to be made.
currentTargetThe object that is actively processing the event object with an event listener.
endIndexIdentifies the index of the last item to be changed.
itemsAn array that lists the items to be changed.
startIndexIdentifies the index of the first item to be changed.
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.

See also