Main Page | Packages | Class Tree | Index | Help

xp.data

class DataView

Object
  |
  +--xp.data.DataView


class DataView
extends Object

Internal helper class for ListDataSource

Maintains a view of the current list


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
indexById: Object
Index associative array

public
list: Array
The data list encapsulated by this view2

Property Summary

public
length: Number (read-only)
Returns the length of the underlying data list encapsulated by this view

Constructor

public
DataView ( list: Array)
Create a new DataView instance

Method Summary

public
addItem ( item: Object ): Void
Add an item to the list

public
addItemAt ( index: Number, item: Object ): Void
Add an item to the list

public
buildIndexById ( ): Void
Builds the key index

public
getItemAt ( index: Number ): Object
Returns the item at the specified index in the array

public
getItemIndex ( item: Object ): Number
Returns the index of the item in the list

public
removeItem ( item: Object ): Void
Remove an item from the view

public
replaceItem ( newItem: Object, oldItem: Object ): Void
Replace an item in the view



Field Documentation

indexById

public var indexById: Object
Index associative array

list

public var list: Array
The data list encapsulated by this view2


Property Documentation

length

public length: Number (read-only)
Returns the length of the underlying data list encapsulated by this view


Constructor Documentation

DataView

public function DataView(list: Array)
Create a new DataView instance

Parameters:
list
the array to underly this view

Method Documentation

addItem

public function addItem(item: Object): Void
Add an item to the list

Parameters:
item
The item to add

addItemAt

public function addItemAt(index: Number,
 item: Object): Void
Add an item to the list

Parameters:
index
item
The item to add

buildIndexById

public function buildIndexById(): Void
Builds the key index

getItemAt

public function getItemAt(index: Number): Object
Returns the item at the specified index in the array

getItemIndex

public function getItemIndex(item: Object): Number
Returns the index of the item in the list

removeItem

public function removeItem(item: Object): Void
Remove an item from the view

Parameters:
item
The item to remove

replaceItem

public function replaceItem(newItem: Object,
 oldItem: Object): Void
Replace an item in the view

Parameters:
newItem
The new item
oldItem
The old item

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc