qnx.fuse.ui.titlebar.SegmentedTitleBar

SegmentedTitleBar

Properties | Methods | Events


Packageqnx.fuse.ui.titlebar
Classpublic class SegmentedTitleBar
InheritanceSegmentedTitleBar Inheritance qnx.fuse.ui.titlebar.TitleBarBase

Defines a title bar with a SegmentedControl inside of it for presenting options to users in the header of a page. A segmented title bar.
package
{
    import qnx.fuse.ui.core.Action;
    import qnx.fuse.ui.events.ActionEvent;
    import qnx.fuse.ui.titlebar.TitleBar;
    
    [SWF(height="1280", width="768", frameRate="60", backgroundColor="#FFFFFF")]
    public class SegmentedTitleBarExample extends Sprite
    {
        public function SegmentedTitleBarExample()
        {    
            initializeUI();
        }
            
        private function initializeUI():void
        {
            var segmentedBar : SegmentedTitleBar = new SegmentedTitleBar();
            segmentedBar.dataProvider = createDP( 4 );
            segmentedBar.addEventListener( Event.CHANGE, onSegmentedTitleBarChanged );
            addChild( segmentedBar );
        }
            
        private function createDP(len : int) : DataProvider
        {
            var dp : DataProvider = new DataProvider();
            for ( var i : int = 0; i < len; i++ )
            {
                dp.addItem( { label:"item " + i } );
            }
            return( dp );
        }
            
        private function onSegmentedTitleBarChanged(event : Event) : void
        {
            trace( "Segmented Control Item Selected: " + (event.target as SegmentedTitleBar).selectedItem );
        }
    }
}
     


Class information:
BlackBerry 10 Version:   10.0.0



Public Properties

 PropertyDefined By
  dataProvider : IDataProvider
Gets or sets the DataProvider object used by the segmented control.
SegmentedTitleBar
  selectedIndex : int
Gets or sets the currently selected index.
SegmentedTitleBar
  selectedItem : Object
Gets or sets the currently selected item.
SegmentedTitleBar

Protected Properties

 PropertyDefined By
  cssID : String
[override] [read-only] Returns the CSS ID of the component.
SegmentedTitleBar

Public Methods

 MethodDefined By
  
SegmentedTitleBar(style:String = blue)
Creates a new SegmentedTitleBar.
SegmentedTitleBar
  
addItem(item:Object):void
SegmentedTitleBar
  
addItemAt(item:Object, index:int):void
SegmentedTitleBar
  
addItemsAt(items:Array, index:int):void
SegmentedTitleBar
  
getItemAt(index:int):Object
SegmentedTitleBar
  
removeAll():void
SegmentedTitleBar
  
removeItem(item:Object):void
SegmentedTitleBar
  
removeItemAt(index:int):void
SegmentedTitleBar
  
replaceItem(newObject:Object, oldObject:Object):void
SegmentedTitleBar
  
replaceItemAt(item:Object, index:int):void
SegmentedTitleBar
  
updateItem(value:Object, oldObject:Object):void
SegmentedTitleBar
  
updateItemAt(value:Object, index:int):void
SegmentedTitleBar
  
updateItemsAt(items:Array, index:int):void
SegmentedTitleBar

Events

 Event Summary Defined By
  Dispatches a change event when the selection of the control changes.SegmentedTitleBar

Property Detail

cssID


cssID:String  [read-only]
[override]

Returns the CSS ID of the component. The CSS ID is used for identifying the type of component in CSS.

The default value is SegmentedTitleBar.


Implementation

protected function get cssID():String

dataProvider


dataProvider:IDataProvider

Gets or sets the DataProvider object used by the segmented control. The DataProvider must be of type IDataProvider.


Implementation

public function get dataProvider():IDataProvider
public function set dataProvider(value:IDataProvider):void

selectedIndex


selectedIndex:int

Gets or sets the currently selected index.

mySegment.selectedIndex = 2;
         


Implementation

public function get selectedIndex():int
public function set selectedIndex(value:int):void

selectedItem


selectedItem:Object

Gets or sets the currently selected item.


Implementation

public function get selectedItem():Object
public function set selectedItem(value:Object):void

Constructor Detail

SegmentedTitleBar()


public function SegmentedTitleBar(style:String = blue)

Creates a new SegmentedTitleBar.

Parameters

style:String (default = blue) — A value in TitleBarStyle. Defaults to the blue style.

Method Detail

addItem()


public function addItem(item:Object):void

Parameters

item:Object

addItemAt()


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

Parameters

item:Object
index:int

addItemsAt()


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

Parameters

items:Array
index:int

getItemAt()


public function getItemAt(index:int):Object

Parameters

index:int

Returns

Object

removeAll()


public function removeAll():void

removeItem()


public function removeItem(item:Object):void

Parameters

item:Object

removeItemAt()


public function removeItemAt(index:int):void

Parameters

index:int

replaceItem()


public function replaceItem(newObject:Object, oldObject:Object):void

Parameters

newObject:Object
oldObject:Object

replaceItemAt()


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

Parameters

item:Object
index:int

updateItem()


public function updateItem(value:Object, oldObject:Object):void

Parameters

value:Object
oldObject:Object

updateItemAt()


public function updateItemAt(value:Object, index:int):void

Parameters

value:Object
index:int

updateItemsAt()


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

Parameters

items:Array
index:int

Event Detail

change


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CHANGE

Dispatches a change event when the selection of the control changes.





comments powered by Disqus