Packagefeathers.core
Interfacepublic interface IFocusManager extends IFeathersEventDispatcher
Implementors DefaultFocusManager

Product Version : Feathers 1.1.0

Interface for focus management.

See also

Keyboard focus management in Feathers
feathers.core.FocusManager
feathers.core.IFocusDisplayObject


Public Properties
 PropertyDefined By
  focus : IFocusDisplayObject
The object that currently has focus.
IFocusManager
  isEnabled : Boolean
Determines if this focus manager is enabled.
IFocusManager
  root : DisplayObjectContainer
[read-only] The top-level container of the focus manager.
IFocusManager
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function):void
Adds a listener for an event type.
IFeathersEventDispatcher
 Inherited
dispatchEvent(event:Event):void
Dispatches an event to all listeners added for the specified event type.
IFeathersEventDispatcher
 Inherited
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event from the pool with the specified to all listeners for the specified event type.
IFeathersEventDispatcher
 Inherited
hasEventListener(type:String, listener:Function = null):Boolean
Checks if a listener has been added for the specified event type.
IFeathersEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function):void
Removes a listener for an event type.
IFeathersEventDispatcher
 Inherited
removeEventListeners(type:String = null):void
Removes all listeners for an event type.
IFeathersEventDispatcher
Events
 Event Summary Defined By
  Dispatched when the value of the focus property changes.IFocusManager
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;


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.


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
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