DataProvider

Kind of class:class
Inherits from:Object
Classpath:mx.controls.listclasses.DataProvider
File last modified:Tuesday, 18 December 2007, 15:44:37

Summary


Constructor
Class properties
Instance properties
Class methods
Instance methods
  • addItemAt (index:Number, value) : Void
  • addItem (value) : Void
  • addItemsAt (index:Number, newItems:Array) : Void
  • removeItemsAt (index:Number, len:Number) : Void
  • removeItemAt (index:Number)
    • remove the item at the specified location
  • removeAll (Void) : Void
    • remove the item at the specified location - relaxed return type for string / object
  • replaceItemAt (index:Number, itemObj) : Void
    • remove the item at the specified location - relaxed return type for string / object
  • getItemAt (index:Number)
    • returns the item at the specified location - relaxed return type for string / object
  • getItemID (index:Number) : Number
  • sortItemsBy (fieldName, order) : Void
    • Sorts the list of items - relaxed parameter types for overloading
  • sortItems (compareFunc, optionFlags) : Void
    • Sorts the list of items - relaxed parameter types for overloading
  • editField (index:Number, fieldName:String, newData) : Void
  • getEditingData (index:Number, fieldName:String)
  • updateViews (event, first, last) : Void

Constructor

DataProvider

function DataProvider (
obj)

Class properties

evtDipatcher

static evtDipatcher = mx.events.EventDispatcher
(read)

mixinProps

static mixinProps:Array = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt",
(read)

mixins

static mixins:DataProvider = new DataProvider()
(read)

Instance properties

addEventListener

addEventListener:Function
(read)

dispatchEvent

dispatchEvent:Function
(read)

length

length:Number
(read)

reverse

reverse:Function
(read)

slice

slice:Function
(read)

sort

sort:Function
(read)

sortOn

sortOn:Function
(read)

splice

splice:Function
(read)

Class methods

Initialize

static function Initialize (
obj:Object) : Boolean

Parameters:
obj:
the object whose prototype will be initialized

Instance methods

addItem

function addItem (
value) : Void

addItemAt

function addItemAt (
index:Number, value) : Void

addItemsAt

function addItemsAt (
index:Number, newItems:Array) : Void

Parameters:
index :
the location for the items to be inserted
newItems:
the array of new items to add

editField

function editField (
index:Number, fieldName:String, newData) : Void

Parameters:
index :
the index of the item
fieldName:
the name of the field to edit
newData :
the new data for the field

getEditingData

function getEditingData (
index:Number, fieldName:String)

Parameters:
index :
the index of the item
fieldName:
the name of the field to edit

getItemAt

function getItemAt (
index:Number)

returns the item at the specified location - relaxed return type for string / object
Parameters:
index:
the location of the item to return
Returns:
  • the item at the location

getItemID

function getItemID (
index:Number) : Number

Parameters:
index:
the location of the item

removeAll

function removeAll (
Void) : Void

remove the item at the specified location - relaxed return type for string / object
Parameters:
index:
the location of the item to remove

removeItemAt

function removeItemAt (
index:Number)

remove the item at the specified location
Parameters:
index:
the location of the item to remove
Returns:
  • the item being deleted - relaxed return type for string / object

removeItemsAt

function removeItemsAt (
index:Number, len:Number) : Void

Parameters:
index:
the location of the items to remove
len :
the number of items to remove

replaceItemAt

function replaceItemAt (
index:Number, itemObj) : Void

remove the item at the specified location - relaxed return type for string / object
Parameters:
index:
the location of the item to remove

sortItems

function sortItems (
compareFunc, optionFlags) : Void

Sorts the list of items - relaxed parameter types for overloading
Parameters:
compareFunc:
- the function to use for comparing items
optionFlags:
the options accepted by Array.sort

sortItemsBy

function sortItemsBy (
fieldName, order) : Void

Sorts the list of items - relaxed parameter types for overloading
Parameters:
fieldName:
the field (or array of fieldNames) upon which to sort
order :
either "asc" or "desc", or the options accepted by Array.sort

updateViews

function updateViews (
event, first, last) : Void

Parameters:
eventObj:
the object to dispatch