Packageflexlib.controls
Classpublic class SuperTabBar
InheritanceSuperTabBar Inheritance mx.controls.TabBar

The SuperTabBar control extends the TabBar control and adds drag and drop functionality and closable tabs.

The SuperTabBar is used by the SuperTabNavigator component, or it can be used on its own to independentaly control a ViewStack. SuperTabBar does not control scrolling of tabs. Scrolling of tabs in the SuperTabNavigator is done by wrapping the SuperTabBar in a scrollable canvas component.

MXML SyntaxexpandedHide MXML Syntax

The <flexlib:SuperTabBar> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:

	  <flexlib:SuperTabBar
	    Properties
	    closePolicy="SuperTab.CLOSE_ROLLOVER|SuperTab.CLOSE_ALWAYS|SuperTab.CLOSE_SELECTED|SuperTab.CLOSE_NEVER"
	    dragEnabled="true"
	    dropEnabled="true"
	 	    Events
	    tabsReorderEvent="No default"
	    >
	    ...
	       child tags
	    ...
	  </flexlib:SuperTabBar>
	  

Default MXML PropertydataProvider

See also

flexlib.containers.SuperTabNavigator
mx.controls.TabBar


Public Properties
 PropertyDefined By
  closePolicy : String
The policy for when to show the close button for each tab.
SuperTabBar
  dragEnabled : Boolean
Boolean indicating if this SuperTabBar allows its tabs to be dragged.
SuperTabBar
  dropEnabled : Boolean
Boolean indicating if this SuperTabBar allows its tabs to be dropped onto it.
SuperTabBar
  editableTabLabels : Boolean
Boolean indicating if tab labels can be edited.
SuperTabBar
Public Methods
 MethodDefined By
  
Constructor
SuperTabBar
  
getClosePolicyForTab(index:int):String
SuperTabBar
  
initialize():void
[override]
SuperTabBar
  
resetTabs():void
SuperTabBar
  
setClosePolicyForTab(index:int, value:String):void
SuperTabBar
Protected Methods
 MethodDefined By
  
getTabClass():Class
For extensibility, if you extend SuperTabBar with a custom tab bar implementation, you can override the getTabClass function to return the class for the tabs that should be used.
SuperTabBar
  
updateNavItemIcon(index:int, icon:Class):void
[override]
SuperTabBar
  
updateNavItemLabel(index:int, label:String):void
[override]
SuperTabBar
Events
 Event Summary Defined By
  Fired when the close button of a tab is clicked.SuperTabBar
  Fired when a tab is dropped onto this SuperTabBar, which re-orders the tabs and updates the list of tabs.SuperTabBar
  Fired when the the label or icon of a child is updated and the tab gets updated to reflect the new icon or label.SuperTabBar
Public Constants
 ConstantDefined By
  TABS_REORDERED : String = tabsReordered
[static] Event that is dispatched when the tabs are re-ordered in the SuperTabBar.
SuperTabBar
Property Detail
closePolicyproperty
closePolicy:String

The policy for when to show the close button for each tab.

This is a proxy property that sets each SuperTab's closePolicy setting to whatever is set here.


Implementation
    public function get closePolicy():String
    public function set closePolicy(value:String):void

See also

flexlib.controls.tabClasses.SuperTab
dragEnabledproperty 
dragEnabled:Boolean

Boolean indicating if this SuperTabBar allows its tabs to be dragged.

If both dragEnabled and dropEnabled are true then the SuperTabBar allows tabs to be reordered with drag and drop.


Implementation
    public function get dragEnabled():Boolean
    public function set dragEnabled(value:Boolean):void
dropEnabledproperty 
dropEnabled:Boolean

Boolean indicating if this SuperTabBar allows its tabs to be dropped onto it.

If both dragEnabled and dropEnabled are true then the SuperTabBar allows tabs to be reordered with drag and drop.


Implementation
    public function get dropEnabled():Boolean
    public function set dropEnabled(value:Boolean):void
editableTabLabelsproperty 
editableTabLabels:Boolean

Boolean indicating if tab labels can be edited. If true, the user can double click on a tab label and edit the label.


Implementation
    public function get editableTabLabels():Boolean
    public function set editableTabLabels(value:Boolean):void
Constructor Detail
SuperTabBar()Constructor
public function SuperTabBar()

Constructor

Method Detail
getClosePolicyForTab()method
public function getClosePolicyForTab(index:int):String

Parameters

index:int

Returns
String
getTabClass()method 
protected function getTabClass():Class

For extensibility, if you extend SuperTabBar with a custom tab bar implementation, you can override the getTabClass function to return the class for the tabs that should be used. The class that you return must extend flexlib.controls.tabBarClasses.SuperTab.

Returns
Class
initialize()method 
override public function initialize():void

resetTabs()method 
public function resetTabs():void

setClosePolicyForTab()method 
public function setClosePolicyForTab(index:int, value:String):void

Parameters

index:int
 
value:String

updateNavItemIcon()method 
override protected function updateNavItemIcon(index:int, icon:Class):void

Parameters

index:int
 
icon:Class

updateNavItemLabel()method 
override protected function updateNavItemLabel(index:int, label:String):void

Parameters

index:int
 
label:String

Event Detail
tabClose Event
Event Object Type: flexlib.events.SuperTabEvent

Fired when the close button of a tab is clicked. To stop the default action, which will remove the child from the collection of children, call event.preventDefault() in your listener.

tabsReordered Event  
Event Object Type: flexlib.events.TabReorderEvent

Fired when a tab is dropped onto this SuperTabBar, which re-orders the tabs and updates the list of tabs.

tabUpdated Event  
Event Object Type: flexlib.events.SuperTabEvent

Fired when the the label or icon of a child is updated and the tab gets updated to reflect the new icon or label. SuperTabNavigator listens for this to refresh the PopUpMenuButton data provider.

Constant Detail
TABS_REORDEREDConstant
public static const TABS_REORDERED:String = tabsReordered

Event that is dispatched when the tabs are re-ordered in the SuperTabBar.