適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
mx.managers 

IFocusManager  - AS3 Flex

套件mx.managers
介面public interface IFocusManager extends IEventDispatcher
實作者 FocusManager

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The IFocusManager interface defines the interface that components must implement to manage the focus on components in response to mouse activity or keyboard activity (Tab key), and to support a default button.

相關 API 元素



公用屬性
 屬性定義自
  defaultButton : IButton
A reference to the original default Button control.
IFocusManager
  defaultButtonEnabled : Boolean
A flag that indicates whether the FocusManager should check for the Enter key being pressed to activate the default button.
IFocusManager
  focusPane : Sprite
A single Sprite that is moved from container to container as the focus moves to those containers.
IFocusManager
  nextTabIndex : int
[唯讀] The next unique tab index to use in this tab loop.
IFocusManager
  showFocusIndicator : Boolean
A flag that indicates whether to display an indicator that a component has focus.
IFocusManager
公用方法
 方法定義自
  
The SystemManager activates and deactivates a FocusManager if more than one IFocusManagerContainer is visible at the same time.
IFocusManager
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
IEventDispatcher
  
The SystemManager activates and deactivates a FocusManager if more than one IFocusManagerContainer is visible at the same time.
IFocusManager
 Inherited
會將事件傳送到事件流程。
IEventDispatcher
  
Returns the IFocusManagerComponent that contains the given object, if any.
IFocusManager
  
Gets the IFocusManagerComponent component that currently has the focus.
IFocusManager
  
Returns the IFocusManagerComponent that would receive focus if the user pressed the Tab key to navigate to another component.
IFocusManager
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
IEventDispatcher
  
Sets showFocusIndicator to false and removes the visual focus indicator from the focused object, if any.
IFocusManager
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
會從 EventDispatcher 物件移除偵聽程式。
IEventDispatcher
  
Sets focus to an IFocusManagerComponent component.
IFocusManager
  
Sets showFocusIndicator to true and draws the visual focus indicator on the focused object, if any.
IFocusManager
 Inherited
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
IEventDispatcher
屬性詳細資訊

defaultButton

屬性
defaultButton:IButton

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

A reference to the original default Button control. Pressing the Enter key while the focus is on any control activates the Button control by dispatching a click event on the Button control, just as if it was clicked with the mouse. The actual default Button control changes if focus is given to another Button control, but switches back to the original if focus is not on a button.

This property is managed by Flex containers; do not set it directly to specify the default button.

The defaultButton must be of class mx.controls.Button even though this property is of type IUIComponent.



實作
    public function get defaultButton():IButton
    public function set defaultButton(value:IButton):void

defaultButtonEnabled

屬性 
defaultButtonEnabled:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

A flag that indicates whether the FocusManager should check for the Enter key being pressed to activate the default button. TextArea and other components that want to recognize the Enter key set this property to false to disable the Enter key from dispatching a click event on the default button, if it exists.



實作
    public function get defaultButtonEnabled():Boolean
    public function set defaultButtonEnabled(value:Boolean):void

focusPane

屬性 
focusPane:Sprite

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

A single Sprite that is moved from container to container as the focus moves to those containers. The Sprite is used as the parent of the visual indicator that a component has focus.



實作
    public function get focusPane():Sprite
    public function set focusPane(value:Sprite):void

nextTabIndex

屬性 
nextTabIndex:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The next unique tab index to use in this tab loop.



實作
    public function get nextTabIndex():int

showFocusIndicator

屬性 
showFocusIndicator:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

A flag that indicates whether to display an indicator that a component has focus. If true a component receiving focus draws a visible indicator that it has focus.

By default, this is false until the user uses the Tab key, then it is set to true.

In general it is better to use the showFocus() and hideFocus() methods to change this property as those methods also update the visual indicator that a component has focus.



實作
    public function get showFocusIndicator():Boolean
    public function set showFocusIndicator(value:Boolean):void
方法詳細資訊

activate

()方法
public function activate():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The SystemManager activates and deactivates a FocusManager if more than one IFocusManagerContainer is visible at the same time. If the mouse is clicked in an IFocusManagerContainer with a deactivated FocusManager, the SystemManager will call the activate() method on that FocusManager. The FocusManager that was activated will have its deactivate() method called prior to the activation of another FocusManager.

deactivate

()方法 
public function deactivate():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The SystemManager activates and deactivates a FocusManager if more than one IFocusManagerContainer is visible at the same time. If the mouse is clicked in an IFocusManagerContainer with a deactivated FocusManager, the SystemManager will call the activate() method on that FocusManager. The FocusManager that was activated will have its deactivate() method called prior to the activation of another FocusManager.

findFocusManagerComponent

()方法 
public function findFocusManagerComponent(o:InteractiveObject):IFocusManagerComponent

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the IFocusManagerComponent that contains the given object, if any. Because the player can set focus to a subcomponent of a Flex component this method determines which IFocusManagerComponent has focus from the component perspective.

參數

o:InteractiveObject — An object that can have player-level focus.

傳回值
IFocusManagerComponent — The IFOcusManagerComponent containing o or null

getFocus

()方法 
public function getFocus():IFocusManagerComponent

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the IFocusManagerComponent component that currently has the focus. Calling this method is recommended instead of using the Stage object because it indicates which component has focus. The Stage might return a subcomponent in that component.

傳回值
IFocusManagerComponent — IFocusManagerComponent object that has focus.

getNextFocusManagerComponent

()方法 
public function getNextFocusManagerComponent(backward:Boolean = false):IFocusManagerComponent

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns the IFocusManagerComponent that would receive focus if the user pressed the Tab key to navigate to another component. It will return the same component as the current focused component if there are no other valid components in the application.

參數

backward:Boolean (default = false) — If true, return the object as if the Shift-Tab keys were pressed.

傳回值
IFocusManagerComponent — The component that would receive focus.

hideFocus

()方法 
public function hideFocus():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Sets showFocusIndicator to false and removes the visual focus indicator from the focused object, if any.

setFocus

()方法 
public function setFocus(o:IFocusManagerComponent):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Sets focus to an IFocusManagerComponent component. Does not check for the components visibility, enabled state, or any other conditions.

參數

o:IFocusManagerComponent — A component that can receive focus.

showFocus

()方法 
public function showFocus():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Sets showFocusIndicator to true and draws the visual focus indicator on the focused object, if any.





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。