| Package | feathers.core | 
| Class | public class FocusManager | 
| Inheritance | FocusManager    Object | 
| Product Version : | Feathers 1.1.0 | 
See also
| Property | Defined By | ||
|---|---|---|---|
| focus : IFocusDisplayObject [static] 
		 The object that currently has focus on Starling.current.stage.  | FocusManager | ||
| focusManagerFactory : Function [static] 
		 A function that creates a focus manager.  | FocusManager | ||
| Method | Defined By | ||
|---|---|---|---|
defaultFocusManagerFactory(root:DisplayObjectContainer):IFocusManager [static] 
		 The default factory that creates a focus manager.  | FocusManager | ||
disableAll():void 
		 Disables focus management on all stages where it has previously been
		 enabled.  | FocusManager | ||
getFocusManagerForStage(stage:Stage):IFocusManager [static] 
		 Returns the active focus manager for the specified Starling stage.  | FocusManager | ||
isEnabledForStage(stage:Stage):Boolean [static] 
		 Determines if the focus manager is enabled or disabled for the
		 specified Starling stage.  | FocusManager | ||
pushFocusManager(root:DisplayObjectContainer):IFocusManager [static] 
		 Adds a focus manager to the stack for the root
		 argument's stage, and gives it exclusive focus.  | FocusManager | ||
removeFocusManager(manager:IFocusManager):void [static] 
		 Removes the specified focus manager from the stack.  | FocusManager | ||
setEnabledForStage(stage:Stage, isEnabled:Boolean):void [static] 
		 Enables or disables focus management on the specified Starling stage.  | FocusManager | ||
| focus | property | 
focus:IFocusDisplayObject
		 The object that currently has focus on Starling.current.stage.
		 May return null if no object has focus.
		 		 
You can call geFocusManagerForStage() to access the
		 active IFocusManager instance for any Stage
		 instance that isn't equal to Starling.current.stage.
In the following example, the focus is changed on the current stage:
FocusManager.focus = someObject;
    public static function get focus():IFocusDisplayObject    public static function set focus(value:IFocusDisplayObject):voidSee also
| focusManagerFactory | property | 
public static var focusManagerFactory:FunctionA function that creates a focus manager.
This function is expected to have the following signature:
function():IFocusManager
In the following example, the focus manager factory is modified:
FocusManager.focusManagerFactory = function(root:DisplayObjectContainer):IPopUpManager
{
    return new CustomFocusManager(); //a custom class that implements IFocusManager
};See also
| defaultFocusManagerFactory | () | method | 
 public static function defaultFocusManagerFactory(root:DisplayObjectContainer):IFocusManagerThe default factory that creates a focus manager.
Parameters
root:DisplayObjectContainer | 
IFocusManager | 
See also
| disableAll | () | method | 
 public function disableAll():voidDisables focus management on all stages where it has previously been enabled.
| getFocusManagerForStage | () | method | 
 public static function getFocusManagerForStage(stage:Stage):IFocusManager
		 Returns the active focus manager for the specified Starling stage.
		 May return null if focus management has not been enabled
		 for the specified stage.
		 		 
Parameters
stage:Stage | 
IFocusManager | 
See also
| isEnabledForStage | () | method | 
 public static function isEnabledForStage(stage:Stage):BooleanDetermines if the focus manager is enabled or disabled for the specified Starling stage.
Parameters
stage:Stage | 
Boolean | 
See also
| pushFocusManager | () | method | 
 public static function pushFocusManager(root:DisplayObjectContainer):IFocusManager
		 Adds a focus manager to the stack for the root
		 argument's stage, and gives it exclusive focus. If focus management
		 has not been enabled for the root's stage, then calling this function
		 will throw a runtime error.
		 
Parameters
root:DisplayObjectContainer | 
IFocusManager | 
| removeFocusManager | () | method | 
 public static function removeFocusManager(manager:IFocusManager):voidRemoves the specified focus manager from the stack. If it was the top-most focus manager, the next top-most focus manager is enabled.
Parameters
manager:IFocusManager | 
| setEnabledForStage | () | method | 
 public static function setEnabledForStage(stage:Stage, isEnabled:Boolean):voidEnables or disables focus management on the specified Starling stage. For mobile apps, the focus manager should generally remain disabled. For desktop apps, it is recommended to enable the focus manager to support keyboard navigation.
In the following example, focus management is enabled:
FocusManager.setEnabledForStage(stage, true);
Parameters
stage:Stage | |
isEnabled:Boolean | 
See also