Package | fl.events |
Class | public class DataChangeEvent |
Inheritance | DataChangeEvent ![]() |
This class provides the following event:
DataChangeEvent.DATA_CHANGE
: dispatched when the component data changes.See also
Property | Defined 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 |
Method | Defined 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 |
Constant | Defined 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 |
changeType | property |
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
endIndex | property |
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
items | property |
items:Array
[read-only]Gets an array that contains the changed items.
Implementation public function get items():Array
startIndex | property |
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
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.
ParameterseventType: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.
|
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.
ReturnsEvent — 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
]
String — A string that contains all the properties of the DataChangeEvent object.
|
DATA_CHANGE | constant |
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:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
changeType | Identifies the type of change that was made. |
currentTarget | The object that is actively processing the event object with an event listener. |
endIndex | Identifies the index of the last changed item. |
items | An array that lists the items that were changed. |
startIndex | Identifies the index of the first changed item. |
target | The 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_CHANGE | constant |
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:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
changeType | Identifies the type of change to be made. |
currentTarget | The object that is actively processing the event object with an event listener. |
endIndex | Identifies the index of the last item to be changed. |
items | An array that lists the items to be changed. |
startIndex | Identifies the index of the first item to be changed. |
target | The 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