qnx.ui.data.ISectionDataProvider

ISectionDataProvider

Methods


Packageqnx.ui.data
Interfacepublic interface ISectionDataProvider extends IDataProvider, flash.events.IEventDispatcher
Implementors SectionDataProvider

The interface for the SectionDataProvider class.

Class information:
BlackBerry 10 Version:   10.0.0

See also

SectionDataProvider



Public Properties

 PropertyDefined By
 Inheriteddata : Array
[read-only] Returns the Array of item data.
IDataProvider
 Inheritedlength : int
[read-only] Returns the length of the data.
IDataProvider

Public Methods

 MethodDefined By
  
addChildToIndex(child:Object, index:int):void
Adds a child to the item at a given index.
ISectionDataProvider
  
addChildToIndexAt(child:Object, index:int, childindex:int):void
Adds a child (at a given child index) to the item at the given index.
ISectionDataProvider
  
addChildToItem(child:Object, item:Object):void
Adds a child to an item, given the child and the item object.
ISectionDataProvider
  
addChildToItemAtIndex(child:Object, item:Object, childindex:int):void
Adds a child to an item at a given index, given the child and the item object.
ISectionDataProvider
 Inherited
addItem(item:Object):void
Adds an item to the DataProvider.
IDataProvider
 Inherited
addItemAt(item:Object, index:int):void
Adds an item at the specified index.
IDataProvider
 Inherited
addItemsAt(items:Array, index:int):void
Adds an array item at the specified index.
IDataProvider
 Inherited
Clones the DataProvider instance.
IDataProvider
  
getChildInIndexAt(index:int, childindex:int):Object
Returns a child from an item at a given index, given the index of the child.
ISectionDataProvider
  
getChildInItemAt(item:Object, childindex:int):Object
Returns a child from an item object, given the index of the child.
ISectionDataProvider
  
Returns the children for a given index.
ISectionDataProvider
  
Returns the children for a given item.
ISectionDataProvider
  
Returns the number of children for the item at the given index.
ISectionDataProvider
  
getChildrenLengthForItem(item:Object):int
Returns the number of children for a given item.
ISectionDataProvider
 Inherited
getItemAt(index:int):Object
Returns the item at a given offset.
IDataProvider
 Inherited
indexOf(obj:Object):int
Returns the index of a given object.
IDataProvider
  
indexOfChildAt(index:int, child:Object):int
Returns the index of a child object, given the index of the item that contains the child and the child object.
ISectionDataProvider
 Inherited
removeAll():void
Removes all items from the DataProvider instance.
IDataProvider
  
Removes all children from the item at a given index.
ISectionDataProvider
  
removeAllChildrenFromItem(item:Object):void
Removes all children from a given item.
ISectionDataProvider
  
removeChildFromIndex(index:int, child:Object):void
Removes a child from an item, given the child and the index of the item.
ISectionDataProvider
  
removeChildFromIndexAt(index:int, childindex:int):void
Removes a child, given the index of the item, and a child index.
ISectionDataProvider
  
removeChildFromItem(item:Object, child:Object):void
Removes the child from an item, given the item and the child.
ISectionDataProvider
  
removeChildFromItemAt(item:Object, childindex:int):void
Removes a child from an item, given the item and the index of the child.
ISectionDataProvider
 Inherited
removeItem(item:Object):void
Removes the item from the DataProvider instance.
IDataProvider
 Inherited
removeItemAt(index:int):void
Removes an item from the DataProvider at a given offset.
IDataProvider
  
replaceChildInIndex(index:int, child:Object, oldChild:Object):void
Replaces a child in an index, given the index of the child, the item that contains the child, and the old child data.
ISectionDataProvider
  
replaceChildInIndexAt(index:int, child:Object, childindex:int):void
Replaces a child in an index at a given offset.
ISectionDataProvider
  
replaceChildInItem(item:Object, child:Object, oldChild:Object):void
Replaces a child in an item, given the child, the item, and the old child data.
ISectionDataProvider
  
replaceChildInItemAt(item:Object, child:Object, childindex:int):void
Replaces a child in an item at a given index, given the item, the child, and the index of the child.
ISectionDataProvider
 Inherited
replaceItem(item:Object, oldObject:Object):void
Replaces an item, given the new item object and the item to replace.
IDataProvider
 Inherited
replaceItemAt(item:Object, index:int):void
Replaces the item at a given offset.
IDataProvider
  
setChildrenForIndex(index:int, children:IDataProvider, throwEvent:Boolean = false):void
Sets the children data for a given index.
ISectionDataProvider
  
setChildrenForItem(item:Object, children:IDataProvider, throwEvent:Boolean = false):void
Sets the children data for a given item, given the DataProvider, and a Boolean that determines whether or not an event will be dispatched.
ISectionDataProvider
 Inherited
setItems(arr:Array, throwEvent:Boolean = false):void
Sets the entire data provider to the new array.
IDataProvider
  
updateChildInIndex(index:int, child:Object, oldChild:Object):void
Updates a child in an item, given the index of the item, the child object, and the old child object.
ISectionDataProvider
  
updateChildInIndexAt(index:int, child:Object, childindex:int):void
Updates a child given the index of the parent (item), the child index, and the new child object.
ISectionDataProvider
  
updateChildInItem(item:Object, child:Object, oldChild:Object):void
Updates a child in an item, given the item, the child to update, and the old child object.
ISectionDataProvider
  
updateChildInItemAt(item:Object, child:Object, childindex:int):void
Updates a child in an item, given the item, the child to update, and the index of the child.
ISectionDataProvider
 Inherited
updateItem(item:Object, oldObject:Object):void
Updates an item, given the new item data object and the item to update.
IDataProvider
 Inherited
updateItemAt(item:Object, index:int):void
Updates the item at a given offset.
IDataProvider
 Inherited
updateItemsAt(items:Array, index:int):void
Updates the items starting at the specified index with new items.
IDataProvider

Method Detail

addChildToIndex()


public function addChildToIndex(child:Object, index:int):void

Adds a child to the item at a given index.

Parameters

child:Object — The child object to add to the item.
index:int — The index of the item at which to add the child.

addChildToIndexAt()


public function addChildToIndexAt(child:Object, index:int, childindex:int):void

Adds a child (at a given child index) to the item at the given index.

In the following listing, a child object with the label value myChild is added to the third item, at the fifth index position.

mySDP.addChildToIndexAt( {label:  myChild}, 3, 5 );    
         

Parameters

child:Object — The child item to add.
index:int — The index of the item, at which to add the child.
childindex:int — The index within the item, at which to add the child.

addChildToItem()


public function addChildToItem(child:Object, item:Object):void

Adds a child to an item, given the child and the item object.

In the following listing, a set of 32 day children are added to each month item.

for( var j:int = 1; j<32; j++ )
{
    mySDP.addChildToItem( {label:  j}, section );    
}
         

Parameters

child:Object — The child object to add to the item.
item:Object — The item object for which to to add the child.

addChildToItemAtIndex()


public function addChildToItemAtIndex(child:Object, item:Object, childindex:int):void

Adds a child to an item at a given index, given the child and the item object.

In the following listing, day data is added to each month using the day value as the index.

for( var j:int = 1; j<32; j++ )
{
    mySDP.addChildToItemAtIndex( {label:  j}, section, j );    
}
         

Parameters

child:Object — The child object to add to the item.
item:Object — The item for which to add the child.
childindex:int — The location at which to add the child.

getChildInIndexAt()


public function getChildInIndexAt(index:int, childindex:int):Object

Returns a child from an item at a given index, given the index of the child.

In the following example, the second child object (index 1) of the sixth item (index 5) is returned. Remember that the arrays are zero-based.

var myObj:Object = mySDP.getChildInIndexAt(5, 1);
         

Parameters

index:int — The index of the item from which to return the child.
childindex:int — The index of the child, within the section.

Returns

Object — The child.

getChildInItemAt()


public function getChildInItemAt(item:Object, childindex:int):Object

Returns a child from an item object, given the index of the child.

In the following example, the child at the 4th index position, of the item object at the 5th index position is returned.

var myObjItem:Object = mySDP.getItemAt(5);            
var myObj:Object = mySDP.getChildInItemAt(myObjItem, 4);
         

Parameters

item:Object — The item from which to return the child.
childindex:int — The index of the child to return.

Returns

Object — The child.

getChildrenAtIndex()


public function getChildrenAtIndex(index:int):IDataProvider

Returns the children for a given index.

Parameters

index:int — The index for which to return the children.

Returns

IDataProvider — A DataProvider containing the children data.

getChildrenForItem()


public function getChildrenForItem(item:Object):IDataProvider

Returns the children for a given item.

Parameters

item:Object — The item for which to return the children.

Returns

IDataProvider — A DataProvider containing the children data.

getChildrenLengthAtIndex()


public function getChildrenLengthAtIndex(index:int):int

Returns the number of children for the item at the given index.

Parameters

index:int — The index of the item for which to return the number of children.

Returns

int — An integer representing the number of children.

getChildrenLengthForItem()


public function getChildrenLengthForItem(item:Object):int

Returns the number of children for a given item.

Parameters

item:Object — The item for which to return the number of children.

Returns

int — The number of children.

indexOfChildAt()


public function indexOfChildAt(index:int, child:Object):int

Returns the index of a child object, given the index of the item that contains the child and the child object.

Parameters

index:int — The index of the item that contains the child, or -1 if the child is not found.
child:Object — The child object.

Returns

int — The index of the child or -1.

removeAllChildrenFromIndex()


public function removeAllChildrenFromIndex(index:int):void

Removes all children from the item at a given index.

Parameters

index:int — The index of the item from which to remove the children.

removeAllChildrenFromItem()


public function removeAllChildrenFromItem(item:Object):void

Removes all children from a given item.

Parameters

item:Object — The item from which to remove all the children.

removeChildFromIndex()


public function removeChildFromIndex(index:int, child:Object):void

Removes a child from an item, given the child and the index of the item.

Parameters

index:int — The index of the item that contains the child.
child:Object — The child object to remove.

removeChildFromIndexAt()


public function removeChildFromIndexAt(index:int, childindex:int):void

Removes a child, given the index of the item, and a child index.

In the following listing, the 29th, 30th, and 31st days (children) are removed from the second item in the list (February). Remember that the arrays are zero-based.

mySectionTileList.removeChildFromIndexAt(1, 30);
mySectionTileList.removeChildFromIndexAt(1, 29);
mySectionTileList.removeChildFromIndexAt(1, 28);
         

Parameters

index:int — The index of the item that contains the child.
childindex:int — The index of the child, within the item.

removeChildFromItem()


public function removeChildFromItem(item:Object, child:Object):void

Removes the child from an item, given the item and the child.

Parameters

item:Object — The item, from which to remove the child.
child:Object — The child object to remove.

removeChildFromItemAt()


public function removeChildFromItemAt(item:Object, childindex:int):void

Removes a child from an item, given the item and the index of the child.

Parameters

item:Object — The item, from which to remove the child.
childindex:int — The index of the child to remove.

replaceChildInIndex()


public function replaceChildInIndex(index:int, child:Object, oldChild:Object):void

Replaces a child in an index, given the index of the child, the item that contains the child, and the old child data.

Parameters

index:int — The index.
child:Object — The new child item.
oldChild:Object — The child object to replace.

replaceChildInIndexAt()


public function replaceChildInIndexAt(index:int, child:Object, childindex:int):void

Replaces a child in an index at a given offset.

Parameters

index:int — The index.
child:Object — The new child object.
childindex:int — The index of the child to replace.

replaceChildInItem()


public function replaceChildInItem(item:Object, child:Object, oldChild:Object):void

Replaces a child in an item, given the child, the item, and the old child data.

Parameters

item:Object — The item that contains the child.
child:Object — The child object to update.
oldChild:Object — The old child object.

replaceChildInItemAt()


public function replaceChildInItemAt(item:Object, child:Object, childindex:int):void

Replaces a child in an item at a given index, given the item, the child, and the index of the child.

Parameters

item:Object — That item that contains the child.
child:Object — The child object to replace.
childindex:int — The index of the child object to replace.

setChildrenForIndex()


public function setChildrenForIndex(index:int, children:IDataProvider, throwEvent:Boolean = false):void

Sets the children data for a given index.

Parameters

index:int — The index for which to set the children data.
children:IDataProvider — A DataProvider object that contains the children data.
throwEvent:Boolean (default = false) — A Boolean that determines whether or not an update event occurs. false by default.

setChildrenForItem()


public function setChildrenForItem(item:Object, children:IDataProvider, throwEvent:Boolean = false):void

Sets the children data for a given item, given the DataProvider, and a Boolean that determines whether or not an event will be dispatched.

Parameters

item:Object — The item for which to add the children.
children:IDataProvider — The DataProvider that contains the children data.
throwEvent:Boolean (default = false) — A Boolean that determines whether or not an event will be dispatched.

updateChildInIndex()


public function updateChildInIndex(index:int, child:Object, oldChild:Object):void

Updates a child in an item, given the index of the item, the child object, and the old child object.

Parameters

index:int — The index to update.
child:Object — The new child object.
oldChild:Object — The old child data.

updateChildInIndexAt()


public function updateChildInIndexAt(index:int, child:Object, childindex:int):void

Updates a child given the index of the parent (item), the child index, and the new child object.

In the following example, a new child object is added to the SectionDataProvider instance in the fifth item index, at the 15th index position.

mySDP.updateChildInIndexAt(5, {label: "MyNewChild"}, 15);
         

Parameters

index:int — The index of the item.
child:Object — The child object to update.
childindex:int — The index of the child to update.

updateChildInItem()


public function updateChildInItem(item:Object, child:Object, oldChild:Object):void

Updates a child in an item, given the item, the child to update, and the old child object.

In the following example, a new child object is added to the SectionDataProvider instance in place of an existing child object.

var myObjItem:Object = mySDP.getItemAt(5);
var myObjChild:Object = mySDP.getChildInItemAt(myObjItem, 7);    
mySDP.updateChildInItem(myObjItem, {label: "MyNewChild"}, myObjChild);
         

Parameters

item:Object — The item that contains the child.
child:Object — The new child object.
oldChild:Object — The child object to update.

updateChildInItemAt()


public function updateChildInItemAt(item:Object, child:Object, childindex:int):void

Updates a child in an item, given the item, the child to update, and the index of the child.

Parameters

item:Object — The item that contains the child.
child:Object — The child to update.
childindex:int — The index of the child to update.





comments powered by Disqus