Package | com.ghostwire.ui.events |
Class | public class uiModelEvent |
Inheritance | uiModelEvent ![]() |
uiModelEvent
class defines events that are dispatched by uiModel
.
~ This class is available in Aspire UI Components Lite Edition ~
Method | Defined by | ||
---|---|---|---|
uiModelEvent(type:String, changeList:Array = null)
Creates a new
uiModelEvent object with the specified parameters. | uiModelEvent |
Constant | Defined 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 |
uiModelEvent | () | constructor |
public function uiModelEvent(type:String, changeList:Array = null)
Creates a new uiModelEvent
object with the specified 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.
|
ADD | constant |
public static const ADD:String = "add"
Dispatched when one or more items have been added to the model.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the event object with an event listener. |
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. |
changeList | An array that lists the items that were added. |
CHANGE | constant |
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:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the event object with an event listener. |
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. |
changeList | An array that lists the items that were modified. |
REMOVE | constant |
public static const REMOVE:String = "remove"
Dispatched when one or more items have been removed from the model.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the event object with an event listener. |
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. |
changeList | An array that lists the items that were removed. |
REPLACE | constant |
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:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the event object with an event listener. |
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. |
changeList | An array containing two elements - the first is the replaced item, the second is the new item. |
SORT | constant |
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:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the event object with an event listener. |
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. |
changeList | An 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. |