Packageqnx.ui.data
Interfacepublic interface IDataViewer extends flash.events.IEventDispatcher
Implementors DropDown, List, Picker, RoundList, SegmentedControl

Interface to be implemented by components that provide access to a DataProvider. The IDataViewer interface provides the functionality for manipulating data in lists.

See also

DataProvider


Public Properties
 PropertyDefined By
  dataProvider : IDataProvider
Gets and sets the DataProvider.
IDataViewer
Public Methods
 MethodDefined By
  
addItem(item:Object):void
Adds an item.
IDataViewer
  
addItemAt(item:Object, index:int):void
Adds an item at a given index.
IDataViewer
  
addItemsAt(items:Array, index:int):void
Adds an array item at the specified index.
IDataViewer
  
getItemAt(index:int):Object
Returns the item at a given index.
IDataViewer
  
removeAll():void
Removes all items from the DataProvider.
IDataViewer
  
removeItem(item:Object):void
Removes an item from the DataProvider, given the item.
IDataViewer
  
removeItemAt(index:int):void
Removes an item from the DataProvider, given the index of the item.
IDataViewer
  
replaceItem(item:Object, oldObject:Object):void
Replaces an item.
IDataViewer
  
replaceItemAt(item:Object, index:int):void
Replaces an item at a given offset.
IDataViewer
  
updateItem(item:Object, oldObject:Object):void
Updates an item.
IDataViewer
  
updateItemAt(item:Object, index:int):void
Updates an item at a given index.
IDataViewer
  
updateItemsAt(items:Array, index:int):void
Updates the items starting at the specified index with new items.
IDataViewer
Property Detail
dataProviderproperty
dataProvider:IDataProvider

Gets and sets the DataProvider.


Implementation
    public function get dataProvider():IDataProvider
    public function set dataProvider(value:IDataProvider):void
Method Detail
addItem()method
public function addItem(item:Object):void

Adds an item. The item is appended to the end of the data.

Parameters

item:Object — The item to add to the DataProvider.

addItemAt()method 
public function addItemAt(item:Object, index:int):void

Adds an item at a given index.

Parameters

item:Object — The item to add.
 
index:int — The index, or offset, at which to add the item.

addItemsAt()method 
public function addItemsAt(items:Array, index:int):void

Adds an array item at the specified index.

Parameters

items:Array — The array of items to add.
 
index:int — The index, or offset, at which to add the items.


Throws
RangeError — Thrown if the specified index is less than 0, or greater than or equal to the length of the data provider.

See also

getItemAt()method 
public function getItemAt(index:int):Object

Returns the item at a given index.

Parameters

index:int — The offset of the item.

Returns
Object — The item.
removeAll()method 
public function removeAll():void

Removes all items from the DataProvider.

removeItem()method 
public function removeItem(item:Object):void

Removes an item from the DataProvider, given the item.

Parameters

item:Object — The item to remove.

removeItemAt()method 
public function removeItemAt(index:int):void

Removes an item from the DataProvider, given the index of the item.

Parameters

index:int — The offset of the item to remove.

replaceItem()method 
public function replaceItem(item:Object, oldObject:Object):void

Replaces an item.

Parameters

item:Object — The new item data.
 
oldObject:Object — The item to replace.

replaceItemAt()method 
public function replaceItemAt(item:Object, index:int):void

Replaces an item at a given offset.

Parameters

item:Object — The replacement item.
 
index:int — The offset of the item to replace.

updateItem()method 
public function updateItem(item:Object, oldObject:Object):void

Updates an item.

Parameters

item:Object — The new item data.
 
oldObject:Object — The item to update.

updateItemAt()method 
public function updateItemAt(item:Object, index:int):void

Updates an item at a given index.

Parameters

item:Object — The new item.
 
index:int — The index of the item to update.

updateItemsAt()method 
public function updateItemsAt(items:Array, index:int):void

Updates the items starting at the specified index with new items.

Parameters

items:Array — The new items to be updated.
 
index:int — The start index to update the items


Throws
RangeError — Thrown if the specified index is less than 0, or greater than or equal to the length of the DataProvider.

See also