qnx.fuse.ui.titlebar.TitleBar

TitleBar

Properties | Methods | Events | Examples


Packageqnx.fuse.ui.titlebar
Classpublic class TitleBar
InheritanceTitleBar Inheritance qnx.fuse.ui.titlebar.TitleBarBase

The TitleBar consists of a title with optional action buttons for accepting or declining an action. A title bar.

Class information:
BlackBerry 10 Version:   10.0.0

View the examples



Public Properties

 PropertyDefined By
  acceptAction : Action
An action that will be displayed beside the title in the title bar.
TitleBar
  dismissAction : Action
An action that will be displayed beside the title in the title bar.
TitleBar
  title : String
The title text to display on the title bar.
TitleBar

Protected Properties

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

Public Methods

 MethodDefined By
  
TitleBar(style:String = blue)
Creates a TitleBar instance.
TitleBar

Events

 Event Summary Defined By
  Dispatched when an Action is selected by pressing either the accept or dismiss buttons on either side of the title.TitleBar

Property Detail

acceptAction


acceptAction:Action

An action that will be displayed beside the title in the title bar. This action should typically be used to accept or confirm some sort of action.


Implementation

public function get acceptAction():Action
public function set acceptAction(value:Action):void

See also

qnx.fuse.ui.core.Action

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 TitleBar.


Implementation

protected function get cssID():String

dismissAction


dismissAction:Action

An action that will be displayed beside the title in the title bar. This action should typically be used to cancel an action or process, or to dismiss or close the current page.


Implementation

public function get dismissAction():Action
public function set dismissAction(value:Action):void

See also

qnx.fuse.ui.core.Action

title


title:String

The title text to display on the title bar. The default value is an empty string, indicating that no title is set.


Implementation

public function get title():String
public function set title(value:String):void

Constructor Detail

TitleBar()


public function TitleBar(style:String = blue)

Creates a TitleBar instance.

By default the title bar has a blue style regardless of the current theme. If you wish to have the visual style of the title bar match the current theme, pass TitleBarStyle.DEFAULT as the style param.

Parameters

style:String (default = blue) — The style of the title bar.

See also

TitleBarStyle

Event Detail

actionSelected


Event Object Type: qnx.fuse.ui.events.ActionEvent
ActionEvent.type property = qnx.fuse.ui.events.ActionEvent.ACTION_SELECTED

Dispatched when an Action is selected by pressing either the accept or dismiss buttons on either side of the title.

Dispatched when an action is selected.

The ActionEvent.ACTION_SELECTED constant defines the value of the type property of the event object for an actionSelected event.

The properties of the event object have the following values:

PropertyValue
actionThe action that was selected.
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeActionEvent.ACTION_SELECTED

Examples

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 TitleBarExample extends Sprite
    {
        public function TitleBarExample()
        {    
            initializeUI();
        }
                
        private function initializeUI():void
        {
            var titlebar : TitleBar = new TitleBar();
            titlebar.title = "Button Title Bar";
            titlebar.acceptAction = new Action( "Accept" );
            titlebar.dismissAction = new Action( "Cancel" );
            titlebar.addEventListener( ActionEvent.ACTION_SELECTED, onTitleActionSelected );
                                
            addChild( titlebar );
        }
                
        private function onTitleActionSelected(event : ActionEvent) : void
        {
            trace( "TitleBarExample.onTitleActionSelected:", event.action );
        }
    }
}
     




comments powered by Disqus