Packagevegas.managers
Classpublic class TabManager
InheritanceTabManager Inheritance CoreModel Inheritance CoreEventDispatcher Inheritance Object

The TabManager manage visual tab process in the applications.

Example :

     import vegas.managers.TabManager ;
     
     var manager:TabManager = new TabManager() ;
     
     manager.auto = true ;
     
     container1.field1.tabIndex = 10 ;
     container1.field2.tabIndex = 20 ;
     container1.field3.tabIndex = 30 ;
     container1.field4.tabIndex = 40 ;
     
     container2.field1.tabIndex = 2 ;
     container2.field2.tabIndex = 1 ;
     container2.field3.tabIndex = 4 ;
     container2.field4.tabIndex = 3 ;
     
     manager.insert("group1", container1.field1 ) ;
     manager.insert("group1", container1.field2 ) ;
     manager.insert("group1", container1.field3 ) ;
     manager.insert("group1", container1.field4 ) ;
     
     manager.insert("group2", container2.field1 ) ;
     manager.insert("group2", container2.field2 ) ;
     manager.insert("group2", container2.field3 ) ;
     manager.insert("group2", container2.field4 ) ;
     
     manager.select("group1") ; // default 
     
     var keyDown:Function = function( e:KeyboardEvent ):void
     {
         var code:int = e.keyCode ;
         switch( code )
         {
             case Keyboard.UP :
             {
                 manager.select("group1") ;
                 break ;
             }
             case Keyboard.DOWN :
             {
                 manager.select("group1" , container1.field3 ) ;
                 break ;
             }
             case Keyboard.LEFT :
             {
                 manager.select("group2") ;
                 break ;
             }
             case Keyboard.RIGHT :
             {
                 manager.select("group2" , container2.field2 ) ;
                 break ;
             }
         }
     }
     
     stage.addEventListener( KeyboardEvent.KEY_DOWN , keyDown ) ;
     



Public Properties
 PropertyDefined By
  auto : Boolean
Indicates if the tab manager use a auto group focus over the interactive objects when there are focused.
TabManager
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 Inheritedid : *
Returns the id of this IModelObject.
CoreModel
Public Methods
 MethodDefined By
  
TabManager(global:Boolean = false, channel:String = null, id:* = null)
Creates a new TabManager instance.
TabManager
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
CoreEventDispatcher
  
clear():void
Removes all elements in this manager.
TabManager
  
contains(id:*):Boolean
Checks whether the map contains the specified group id.
TabManager
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
  
Returns the current group id selected in the manager.
TabManager
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
  
[static] Returns the singleton reference of the TabManager class.
TabManager
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
  
insert(id:*, child:InteractiveObject):Boolean
Insert a new child object in the manager with the specified id.
TabManager
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
  
remove(id:*, child:InteractiveObject):Boolean
Removes a child object in the manager with the specified id.
TabManager
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
run(... arguments):void
Run the first process with this model.
CoreModel
  
select(id:*, defaultChild:InteractiveObject = null):Boolean
Select the specified group and returns true if the group exist.
TabManager
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
  
unSelect():Boolean
Unselect the specified group and returns true if the group exist.
TabManager
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
CoreEventDispatcher
Protected Methods
 MethodDefined By
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
Property Detail
autoproperty
public var auto:Boolean

Indicates if the tab manager use a auto group focus over the interactive objects when there are focused.

Constructor Detail
TabManager()Constructor
public function TabManager(global:Boolean = false, channel:String = null, id:* = null)

Creates a new TabManager instance.

Parameters
global:Boolean (default = false) — the id of the model.
 
channel:String (default = null) — the flag to use a global event flow or a local event flow.
 
id:* (default = null) — the name of the global event flow if the bGlobal argument is true.
Method Detail
clear()method
public function clear():void

Removes all elements in this manager.

contains()method 
public function contains(id:*):Boolean

Checks whether the map contains the specified group id.

Parameters

id:*

Returns
Boolean
getCurrent()method 
public function getCurrent():*

Returns the current group id selected in the manager.

Returns
* — the current group id selected in the manager.
getInstance()method 
public static function getInstance():TabManager

Returns the singleton reference of the TabManager class.

Returns
TabManager — the singleton reference of the TabManager class.
insert()method 
public function insert(id:*, child:InteractiveObject):Boolean

Insert a new child object in the manager with the specified id.

Parameters

id:* — The key of the group to collect the specified interactive object.
 
child:InteractiveObject — The interactive object to collect in the manager.

Returns
Booleantrue if the interactive object is inserted in the manager.

Throws
ArgumentError — the id argument not must be 'null' or 'undefined'.
remove()method 
public function remove(id:*, child:InteractiveObject):Boolean

Removes a child object in the manager with the specified id.

Parameters

id:* — The key of the group to collect the specified interactive object.
 
child:InteractiveObject — The interactive object to collect in the manager.

Returns
Booleantrue if the interactive object is removed in the manager.

Throws
ArgumentError — the id argument not must be 'null' or 'undefined'.
select()method 
public function select(id:*, defaultChild:InteractiveObject = null):Boolean

Select the specified group and returns true if the group exist.

Parameters

id:* — The key of the tab group of interactive objects.
 
defaultChild:InteractiveObject (default = null) — (optional) The default interactive object to select by default when the group is selected.

Returns
Booleantrue if the specified group of interactive objects is selected.

Throws
ArgumentError — the id argument not must be 'null' or 'undefined'.
unSelect()method 
public function unSelect():Boolean

Unselect the specified group and returns true if the group exist.

Returns
Booleantrue if the unselected group exist and the process is success.