Packagefeathers.core
Classpublic class DefaultFocusManager
InheritanceDefaultFocusManager Inheritance starling.events.EventDispatcher
Implements IFocusManager

Product Version : Feathers 2.0.0

The default IFocusManager implementation. This focus manager is designed to work on both desktop and mobile. Focus may be controlled by Keyboard.TAB (including going backwards when holding the shift key) or with the arrow keys on a d-pad (such as those that appear on a smart TV remote control and some game controllers).

To simulate KeyLocation.D_PAD in the AIR Debug Launcher on desktop for debugging purposes, set DeviceCapabilities.simulateDPad to true.

See also

Keyboard focus management in Feathers
feathers.core.FocusManager


Public Properties
 PropertyDefined By
  focus : IFocusDisplayObject
The object that currently has focus.
DefaultFocusManager
  isEnabled : Boolean
Determines if this focus manager is enabled.
DefaultFocusManager
  root : DisplayObjectContainer
[read-only] The top-level container of the focus manager.
DefaultFocusManager
Public Methods
 MethodDefined By
  
DefaultFocusManager(root:DisplayObjectContainer)
Constructor.
DefaultFocusManager
Events
 Event Summary Defined By
  Dispatched when the value of the focus property changes.DefaultFocusManager
Property Detail
focusproperty
focus:IFocusDisplayObject

The object that currently has focus. May return null if no object has focus.

In the following example, the focus is changed:

focusManager.focus = someObject;

The default value is null.


Implementation
    public function get focus():IFocusDisplayObject
    public function set focus(value:IFocusDisplayObject):void
isEnabledproperty 
isEnabled:Boolean

Determines if this focus manager is enabled. A focus manager may be disabled when another focus manager has control, such as when a modal pop-up is displayed.

The default value is false.


Implementation
    public function get isEnabled():Boolean
    public function set isEnabled(value:Boolean):void
rootproperty 
root:DisplayObjectContainer  [read-only]

The top-level container of the focus manager. This isn't necessarily the root of the display list.


Implementation
    public function get root():DisplayObjectContainer
Constructor Detail
DefaultFocusManager()Constructor
public function DefaultFocusManager(root:DisplayObjectContainer)

Constructor.

Parameters
root:DisplayObjectContainer
Event Detail
change Event
Event Object Type: starling.events.Event
Event.type property = starling.events.Event.CHANGE

Dispatched when the value of the focus property changes.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
datanull
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

See also