| Package | vegas.managers |
| Class | public class TabManager |
| Inheritance | TabManager CoreModel CoreEventDispatcher Object |
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 ) ;
| Property | Defined By | ||
|---|---|---|---|
| auto : Boolean
Indicates if the tab manager use a auto group focus over the interactive objects when there are focused. | TabManager | ||
![]() | channel : String [read-only]
Indicates the channel of this dispatcher if this instance is global. | CoreEventDispatcher | |
![]() | id : *
Returns the id of this IModelObject. | CoreModel | |
| Method | Defined By | ||
|---|---|---|---|
TabManager(global:Boolean = false, channel:String = null, id:* = null)
Creates a new TabManager instance. | TabManager | ||
![]() | 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 | ||
![]() | dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow. | CoreEventDispatcher | |
getCurrent():*
Returns the current group id selected in the manager. | TabManager | ||
![]() |
Returns the internal system.events.EventDispatcher reference. | CoreEventDispatcher | |
[static]
Returns the singleton reference of the TabManager class. | TabManager | ||
![]() | 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 | ||
![]() | isGlobal():Boolean
Indicates if the dispatcher use a global event flow. | CoreEventDispatcher | |
![]() | isLocked():Boolean
Returns true if the object is locked. | CoreEventDispatcher | |
![]() | lock():void
Locks the object. | CoreEventDispatcher | |
![]() | 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 | ||
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object. | CoreEventDispatcher | |
![]() | 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 | ||
![]() | setEventDispatcher(dispatcher:EventDispatcher):void
Sets the internal EventDispatcher reference. | CoreEventDispatcher | |
![]() | 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 | |
![]() | unlock():void
Unlocks the display. | CoreEventDispatcher | |
![]() | 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 | ||
![]() | 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 | |
| auto | property |
public var auto:BooleanIndicates if the tab manager use a auto group focus over the interactive objects when there are focused.
| TabManager | () | Constructor |
public function TabManager(global:Boolean = false, channel:String = null, id:* = null)Creates a new TabManager instance.
Parametersglobal: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.
|
| clear | () | method |
public function clear():voidRemoves all elements in this manager.
| contains | () | method |
public function contains(id:*):BooleanChecks whether the map contains the specified group id.
Parameters
id:* |
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():TabManagerReturns the singleton reference of the TabManager class.
ReturnsTabManager — the singleton reference of the TabManager class.
|
| insert | () | method |
public function insert(id:*, child:InteractiveObject):BooleanInsert 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.
|
Boolean — true if the interactive object is inserted in the manager.
|
ArgumentError — the id argument not must be 'null' or 'undefined'.
|
| remove | () | method |
public function remove(id:*, child:InteractiveObject):BooleanRemoves 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.
|
Boolean — true if the interactive object is removed in the manager.
|
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.
|
Boolean — true if the specified group of interactive objects is selected.
|
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.
Boolean — true if the unselected group exist and the process is success.
|