Packageat.display
Classpublic class ButtonBarNavigator
InheritanceButtonBarNavigator Inheritance mx.containers.VBox
ImplementsINavigationUI
SubclassesBookmarkButtonBarNavigator, CallButtonBarNavigator

Based on XML loaded into slideNavXML, rows of buttons are created to navigate sections of content.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined by
  buttonHeight : Number = 25
Sets the height for all buttons.
ButtonBarNavigator
  buttonList : Array
[read-only] A list of all of the Buttons in the ButtonBarNavigator.
ButtonBarNavigator
  buttonsPerRow : Array
Determines how many buttons will be displayed per row based on the values in an Array.
ButtonBarNavigator
  cursor : IViewCursor
Cursor for the dataProvider.
ButtonBarNavigator
  dataProvider : Object
Data to be used for the control.
ButtonBarNavigator
  debugMode : Boolean = false
Outputs useful information for debugging this component for developers when true.
ButtonBarNavigator
  enableButtons : Boolean
Returns whether all Buttons are enabled in the ButtonBarNavigator
ButtonBarNavigator
  labelField : String
Value in to use for the dataProvider to use for the label of the Buttons.
ButtonBarNavigator
  navigationManager : INavigationManager
Instance of the INavigationManager class.
ButtonBarNavigator
  numRows : int
[read-only] Read-only variable for the number of rows determined by the number of <row>s in the navXML XMLList.
ButtonBarNavigator
  rowList : Array
[read-only] A list of all of the rows in the ButtonBarNavigator.
ButtonBarNavigator
  selectable : Boolean
When true only one button can be selected at a time.
ButtonBarNavigator
  selectedChild : DisplayObject
Sets the selected Button by DisplayObject.
ButtonBarNavigator
  selectedIndex : int
Sets the selected property to the button at the index supplied.
ButtonBarNavigator
  selectedItem : Object
The data from the currently selected Button in the component.
ButtonBarNavigator
  spacerList : Array
[read-only] A list of all of the Spacer's created, if the attribute "buttonBarVisualSpaceAfter" is set.
ButtonBarNavigator
  useDefaultNavigationBehavior : Boolean
ButtonBarNavigator
  validateNavigation : Boolean = true
If set to true, buttons automatically disable if they violate a navigation business constraint.
ButtonBarNavigator
Public Methods
 MethodDefined by
  
Constructor.
ButtonBarNavigator
  
collectionChangeHandler(e:CollectionEvent):void
Updates the label if the property in the dataProvider changes.
ButtonBarNavigator
  
destroy():void
Removes the event listeners and all of the buttons and rows inside of this component.
ButtonBarNavigator
  
setSelected(value:Object):void
This method sets currently selected button's property selected to true, while setting false to all other buttons if selectable is true.
ButtonBarNavigator
Protected Methods
 MethodDefined by
  
buttonClickHandler(e:MouseEvent):void
Executed when a button is clicked.
ButtonBarNavigator
  
Creates the entire button navigation.
ButtonBarNavigator
  
Handles navigation changes if not by clicking on a button.
ButtonBarNavigator
  
Handles a navigation change event when a navigationManager is set.
ButtonBarNavigator
Events
 EventSummaryDefined by
   Dispatched when an button was clicked.ButtonBarNavigator
   Dispatched when all of the buttons have been created based on a new dataProvider.ButtonBarNavigator
   Dispatched when an button has been selected.ButtonBarNavigator
   Dispatched when the user clicks on an item in the control.ButtonBarNavigator
Styles
 StyleDescriptionDefined by
  
buttonBarButtonStyleName
Type: String   CSS Inheritance: no
This defines the styleName for each button. Individual buttons can be overridden via the <section> attribute "styleName" or all can be changed to a different style via CSS. The default value is "buttonBarButtonStyle".
ButtonBarNavigator
  
buttonBarRowStyleName
Type: String   CSS Inheritance: no
This defines the styleName for each of the row(s) of buttons. The default value is "buttonBarRowStyle".
ButtonBarNavigator
  
horizontalGap
Type: int
The amout of padding in pixels horizontally between each Button. The default value is 0.
ButtonBarNavigator
  
selectedButtonTextColor
Type: uint
When a Button's selected property is true, the Button defaults to the normal text color for the control. This property will set a color to the text when the Button is selected. The default value is 0xffcc00.
ButtonBarNavigator
  
verticalGap
Type: int
The amout of padding in pixels vertically between each row of Buttons. The default value is 0.
ButtonBarNavigator
Property detail
buttonHeightproperty
public var buttonHeight:Number = 25

Sets the height for all buttons. This value can be overwritten by setting "buttonBarHeight" for each Button in the dataProvider.

The default value is 25.

buttonListproperty 
buttonList:Array  [read-only]

A list of all of the Buttons in the ButtonBarNavigator.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get buttonList():Array
buttonsPerRowproperty 
buttonsPerRow:Array  [read-write]

Determines how many buttons will be displayed per row based on the values in an Array. To allow for two buttons in the first row, three in the second row and five in the third row you would pass: [2, 3, 5]

The default value is [100].

Implementation
    public function get buttonsPerRow():Array
    public function set buttonsPerRow(value:Array):void
cursorproperty 
public var cursor:IViewCursor

Cursor for the dataProvider.

dataProviderproperty 
dataProvider:Object  [read-write]

Data to be used for the control.

Accepted parameters:

debugModeproperty 
public var debugMode:Boolean = false

Outputs useful information for debugging this component for developers when true.

The output is typically in the form of trace statements and Alerts.

The default value is false.

enableButtonsproperty 
enableButtons:Boolean  [read-write]

Returns whether all Buttons are enabled in the ButtonBarNavigator

Implementation
    public function get enableButtons():Boolean
    public function set enableButtons(value:Boolean):void
labelFieldproperty 
labelField:String  [read-write]

Value in to use for the dataProvider to use for the label of the Buttons.

The default value is "title".

Implementation
    public function get labelField():String
    public function set labelField(value:String):void
navigationManagerproperty 
navigationManager:INavigationManager  [read-write]

Instance of the INavigationManager class. Adding the SlideManager allows for the button bar to navigate. The SlideManager typically is referenced from a PresentationModule.

Implementation
    public function get navigationManager():INavigationManager
    public function set navigationManager(value:INavigationManager):void

See also

at.display.PresentationModule
numRowsproperty 
numRows:int  [read-only]

Read-only variable for the number of rows determined by the number of <row>s in the navXML XMLList.

This property can be used as the source for data binding.

Implementation
    public function get numRows():int
rowListproperty 
rowList:Array  [read-only]

A list of all of the rows in the ButtonBarNavigator.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get rowList():Array
selectableproperty 
selectable:Boolean  [read-write]

When true only one button can be selected at a time.

The default value is true.

Implementation
    public function get selectable():Boolean
    public function set selectable(value:Boolean):void
selectedChildproperty 
selectedChild:DisplayObject  [read-write]

Sets the selected Button by DisplayObject.

Returns null if nothing is selected.

This property can be used as the source for data binding.

Implementation
    public function get selectedChild():DisplayObject
    public function set selectedChild(value:DisplayObject):void
selectedIndexproperty 
selectedIndex:int  [read-write]

Sets the selected property to the button at the index supplied.

Conversely, it returns the index of the selected Button. It returns -1 if nothing is selected.

This property can be used as the source for data binding.

Implementation
    public function get selectedIndex():int
    public function set selectedIndex(value:int):void
selectedItemproperty 
selectedItem:Object  [read-write]

The data from the currently selected Button in the component.

This property can be used as the source for data binding.

Implementation
    public function get selectedItem():Object
    public function set selectedItem(value:Object):void
spacerListproperty 
spacerList:Array  [read-only]

A list of all of the Spacer's created, if the attribute "buttonBarVisualSpaceAfter" is set.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get spacerList():Array
useDefaultNavigationBehaviorproperty 
useDefaultNavigationBehavior:Boolean  [read-write]

The default value is true.

Implementation
    public function get useDefaultNavigationBehavior():Boolean
    public function set useDefaultNavigationBehavior(value:Boolean):void
validateNavigationproperty 
public var validateNavigation:Boolean = true

If set to true, buttons automatically disable if they violate a navigation business constraint.

Constructor detail
ButtonBarNavigator()constructor
public function ButtonBarNavigator()

Constructor.

Method detail
buttonClickHandler()method
protected function buttonClickHandler(e:MouseEvent):void

Executed when a button is clicked. It takes the assigned button id to pass on to the SlideManager for navigation.

Parameters
e:MouseEvent — The event
collectionChangeHandler()method 
public function collectionChangeHandler(e:CollectionEvent):void

Updates the label if the property in the dataProvider changes.

Parameters
e:CollectionEvent — The collection change event
createNavigation()method 
protected function createNavigation():void

Creates the entire button navigation.

Removes all children if previous button structure exists or XML is updated.

destroy()method 
public function destroy():void

Removes the event listeners and all of the buttons and rows inside of this component.

externalChange()method 
protected function externalChange(e:NavigationChangeEvent):void

Handles navigation changes if not by clicking on a button.

If the navigationManager exists, this is based on navigation events from the manager.

Parameters
e:NavigationChangeEvent — event object

See also

navigationChangeHandler()method 
protected function navigationChangeHandler(e:NavigationChangeEvent):void

Handles a navigation change event when a navigationManager is set.

When the navigationManager is set, on every navigation change, the SectionButton sets the canGoNext and canGoPrev booleans to determine if the button can go to the next slide or previous slide based on the current slide. This value can then be set our bound to the component in MXML to set the visible or enabled property of the button to prevent clicking due to business rules being violated.

Parameters
e:NavigationChangeEvent — The navigation change event
setSelected()method 
public function setSelected(value:Object):void

This method sets currently selected button's property selected to true, while setting false to all other buttons if selectable is true.

This method checks the SlideManager's selected property to set selected to the button based on its id.

Parameters
value:Object — The id of the object to be selected
Event detail
changeSelectedevent 
Event object type: at.events.NavigationUIEvent
NavigationUIEvent.type property = at.events.NavigationUIEvent.CHANGE_SELECTED

Dispatched when an button was clicked.

The NavigationalUIEvent.CHANGE_SELECTED constant defines the value of the type property of the event object for a changeSelected event.

childrenCreatedevent  
Event object type: at.events.NavigationUIEvent
NavigationUIEvent.type property = at.events.NavigationUIEvent.CHILDREN_CREATED

Dispatched when all of the buttons have been created based on a new dataProvider.

The NavigationalUIEvent.CHILDREN_CREATED_FROM_DATA constant defines the value of the type property of the event object for a childrenCreated event.

focusSetevent  
Event object type: at.events.NavigationUIEvent
NavigationUIEvent.type property = at.events.NavigationUIEvent.FOCUS_SET

Dispatched when an button has been selected. Occurs at the same time as the itemClick.

The NavigationalUIEvent.FOCUS_SET constant defines the value of the type property of the event object for a focusSet event.

itemClickevent  
Event object type: mx.events.ItemClickEvent

Dispatched when the user clicks on an item in the control.