qnx.fuse.ui.listClasses.RoundList

RoundList

Properties | Methods | Events | Examples


Packageqnx.fuse.ui.listClasses
Classpublic class RoundList
InheritanceRoundList Inheritance List Inheritance UIComponent Inheritance flash.display.MovieClip
Implements IDataViewer

The RoundList class allows you to display cells in a scrolling vertical list. The round list has no scroll bar, and continues to scroll from the beginning once the final cell has been reached.

Class information:
PlayBook Tablet OS Version:   1.0.6

View the examples

See also

List



Public Properties

 PropertyDefined By
 InheritedallowDeselect : Boolean
Determines if a selected cell in the list can be deselected when pressed.
List
 InheritedcellRenderer : Object
Sets the cell renderer to use to populate the list.
List
 InheritedcolumnWidth : int
Gets or sets the width of each column in the list.
List
 InheriteddataProvider : IDataProvider
Gets or sets the DataProvider instance for the list.
List
 InheritedenableShadows : Boolean
Sets or gets whether the scroll shadows should be shown.
List
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
 InheritedfirstVisibleItem : ICellRenderer
[read-only] Returns the first visible item in the view port area as defined by the width and height
List
 InheritedfooterView : DisplayObject
Gets or sets the footer view.
List
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlastVisibleItem : ICellRenderer
[read-only] Returns the last visible item in the view port area as defined by the width and height
List
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
 InheritedrowHeight : int
Gets or sets the height of each row in the list.
List
 Inheritedscrollable : Boolean
Gets or sets a value that determines whether a list can be scrolled.
List
 InheritedscrollBarAlpha : Number
Gets or sets the opacity value for the scroll bar on the list.
List
 InheritedscrollBarColor : uint
Gets or sets the color of the scroll bar.
List
 InheritedscrollBarOffset : int
Gets or sets the x or y postion of the scrollbar, in pixels.
List
 InheritedscrollDirection : String
Gets or sets the scroll direction of the list.
List
 InheritedselectedIndex : int
Gets or sets the index of the currently selected item in a single-selection list.
List
 InheritedselectedIndices : Array
Gets or sets the selected cells at the specified indices in a multi-selectable list.
List
 InheritedselectedItem : Object
Gets or sets the currently selected item in a single-selectable list.
List
 InheritedselectedItems : Array
Gets or sets the group of selected items (selectedItems) in a multi-selectable list.
List
 InheritedselectionMode : int
Gets or sets a value that determines whether or not selection mode is enabled.
List

Public Methods

 MethodDefined By
  
Creates a RoundList instance.
RoundList
 Inherited
addItem(item:Object):void
Appends an item to the end of the list.
List
 Inherited
addItemAt(item:Object, index:int):void
Adds an item to the list at the specified index.
List
 Inherited
addItemsAt(items:Array, index:int):void
Adds an array item at the specified index.
List
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
[override] Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
List
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
getIsCellVisibleAtIndex(index:int):Boolean
Returns a Boolean indicating whether or not a cell at a given index is visible in the virtual area.
List
 Inherited
getItemAt(index:int):Object
Returns the item in the DataProvider at the specified index.
List
 Inherited
[override] Returns a flag indicating whether or not the list can grow vertically or horizontally.
List
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
 Inherited
removeAll():void
Removes all the items from the list.
List
 Inherited
removeItem(item:Object):void
Removes a given item from the list.
List
 Inherited
removeItemAt(index:int):void
Removes an item from list at the specified index.
List
 Inherited
replaceItem(item:Object, oldObject:Object):void
Replaces an item, given the new item object and the old item.
List
 Inherited
replaceItemAt(item:Object, index:int):void
Replaces the item in the list at the specified index with a new item.
List
 Inherited
scrollIndexVisible(index:int, seconds:Number = 1):void
Scrolls a given item into view, given an index and an animation duration (in seconds).
List
 Inherited
scrollToIndex(index:int, seconds:Number = 1):void
Animates the cell at the specified index into view.
List
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
updateItem(value:Object, oldObject:Object):void
Updates an item in the list, given the new item and the item to update.
List
 Inherited
updateItemAt(item:Object, index:int):void
Updates the item in the list at the specified index, given the new item.
List
 Inherited
updateItemsAt(items:Array, index:int):void
Updates the items starting at the specified index with new items.
List
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent

Protected Methods

 MethodDefined By
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
doMeasure(availableX:Number, availableY:Number):LayoutMeasurement
[override]
List
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent

Events

 Event Summary Defined By
 InheritedDispatched when a change has occurred in the DataProvider.List
 Inherited Dispatched when a cell renderer is clicked.List
 Inherited Dispatched when scrolling begins.List
 Inherited Dispatched when scrolling ends.List
 Inherited Dispatched when scrolling occurs.List

Constructor Detail

RoundList()


public function RoundList()

Creates a RoundList instance.

Examples

In the following example, a RoundList class is instantiated and initialized:

package
{
    import flash.display.Sprite;    
    
    import qnx.ui.data.DataProvider;
    import qnx.fuse.ui.events.ListEvent;
    import qnx.fuse.ui.listClasses.RoundList;
    import qnx.fuse.ui.listClasses.ListSelectionMode;
    
    [SWF(height="600", width="1024", frameRate="30", backgroundColor="#FFFFFF")]
    public class RoundListSample extends Sprite
    {
        public function RoundListSample()
        {
            initializeUI();
        }
        
        private function initializeUI():void
        {
            
            var arrMonth:Array=[];
            // add objects with a label property
            arrMonth.push({label: "Bananas"});
            arrMonth.push({label: "Apples"});
            arrMonth.push({label: "Bacon"});
            arrMonth.push({label: "Hot dogs"});
            arrMonth.push({label: "Celery"});
            
            var myList:RoundList = new RoundList();            
            myList.setPosition(100, 100);            
            myList.width = 200;            
            myList.height = 200;     
            
            //set the dataProvider
            myList.selectionMode = ListSelectionMode.SINGLE;        
            myList.dataProvider = new DataProvider(arrMonth);        
            
            myList.addEventListener(ListEvent.ITEM_CLICKED, onListClick);
            
            this.addChild(myList);
            
        }
        
        private function onListClick(event:ListEvent):void {
            
            trace("Item clicked: " + event.data.label);
            trace("Index clicked: " + event.index);
        }
        
    }
}