blob: e10ebd8981128750f61b4c51ae1d6086cf9ff87d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="FocusManager,mx.managers.FocusManager,APPLICATION,COPY,HIGH,LINK,LOW,MEDIUM,MOVE,NONE,NO_CURSOR,PARENT,POPUP,allowDomainsInNewRSLs,allowDomainsInNewRSLs,allowInsecureDomainsInNewRSLs,allowInsecureDomainsInNewRSLs,application,base,childAllowsParent,childAllowsParent,currentCursorID,currentCursorXOffset,currentCursorYOffset,currentTarget,currentToolTip,cursorChildren,cursorChildren,cursorChildren,defaultButton,defaultButton,defaultButton,defaultButtonEnabled,defaultButtonEnabled,document,document,document,embeddedFontList,embeddedFontList,enabled,explicitHeight,explicitWidth,focusEnabled,focusManager,focusPane,focusPane,focusPane,focusPane,focusPane,fragment,groupName,hasFocusableChildren,hasFocusableContent,height,height,hideDelay,hideEffect,initialized,isDragging,isProxy,isProxy,isProxy,loaderInfo,measuredHeight,measuredWidth,mouseFocusEnabled,nestLevel,nextTabIndex,nextTabIndex,numChildren,numChildren,numModalWindows,numModalWindows,numModalWindows,parent,parentAllowsChild,parentAllowsChild,popUpChildren,popUpChildren,popUpChildren,preloadedRSLs,preloaderBackgroundAlpha,preloaderBackgroundColor,preloaderBackgroundImage,preloaderBackgroundSize,processedDescriptors,rawChildren,rawChildren,rawChildren,screen,screen,screen,scrubDelay,selected,showDelay,showEffect,showFocusIndicator,showFocusIndicator,stage,swfBridgeGroup,systemManager,tabFocusEnabled,tabIndex,title,toolTip,toolTipChildren,toolTipChildren,toolTipChildren,toolTipClass,topLevelSystemManager,topLevelSystemManager,topLevelSystemManager,updateCompletePendingFlag,url,usePhasedInstantiation,usePhasedInstantiation,width,width,acceptDragDrop,activate,activate,addChildBridge,addChildToSandboxRoot,addPopUp,addPreloadedRSL,allowDomain,allowInsecureDomain,assignFocus,attachListeners,bringToFront,callInContext,centerPopUp,contains,create,create,createPopUp,createToolTip,deactivate,deactivate,deployMouseShields,deployMouseShields,deployMouseShields,destroyToolTip,dispatchEventFromSWFBridges,doDrag,drawFocus,findFocusManagerComponent,findFocusManagerComponent,getDefinitionByName,getDefinitionByName,getDefinitionByName,getExplicitOrMeasuredHeight,getExplicitOrMeasuredWidth,getFeedback,getFocus,getFocus,getFocus,getInstance,getInstance,getInstance,getNextFocusManagerComponent,getNextFocusManagerComponent,getSWFRoot,getSandboxRoot,getSandboxRoot,getSandboxRoot,getTopLevelRoot,getTopLevelRoot,getTopLevelRoot,getVisibleApplicationRect,getVisibleApplicationRect,getVisibleApplicationRect,hideCursor,hideFocus,hideFocus,init,initForHistoryManager,initialize,invalidateDisplayList,invalidateDisplayList,invalidateParentSizeAndDisplayList,invalidateParentSizeAndDisplayList,invalidateParentSizeAndDisplayList,invalidateProperties,invalidateProperties,invalidateSize,invalidateSize,isDisplayObjectInABridgedApplication,isFontFaceEmbedded,isFontFaceEmbedded,isFontFaceEmbedded,isInvalid,isInvalid,isTopLevel,isTopLevel,isTopLevel,isTopLevelRoot,isTopLevelRoot,isTopLevelRoot,isTopLevelWindow,isTopLevelWindow,loadState,move,register,removeAllCursors,removeBusyCursor,removeChildBridge,removeChildFromSandboxRoot,removeCursor,removePopUp,save,saveState,setActualSize,setBusyCursor,setCursor,setFocus,setFocus,setFocus,setFragment,setTitle,showCursor,showFeedback,showFocus,showFocus,toString,toString,unregister,useSWFBridge,validateClient,validateClient,validateDisplayList,validateNow,validateNow,validateProperties,validateSize"><title>mx.managers.FocusManager</title></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript"><!--
asdocTitle = 'FocusManager - ApacheFlex API Reference';
var baseRef = '../../';
window.onload = configPage;
--></script>
<script type="text/javascript">
scrollToNameAnchor();
</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../index.html?mx/managers/FocusManager.html&amp;mx/managers/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">FocusManager</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("FocusManager"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);}
-->
</script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.managers</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class FocusManager</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">FocusManager <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> flash.events.EventDispatcher</td></tr><tr><td class="classHeaderTableLabel">Implements</td><td> <a href="../../mx/managers/IFocusManager.html">IFocusManager</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p>
The FocusManager class manages the focus on components in response to mouse
activity or keyboard activity (Tab key). There can be several FocusManager
instances in an application. Each FocusManager instance
is responsible for a set of components that comprise a "tab loop". If you
hit Tab enough times, focus traverses through a set of components and
eventually get back to the first component that had focus. That is a "tab loop"
and a FocusManager instance manages that loop. If there are popup windows
with their own set of components in a "tab loop" those popup windows will have
their own FocusManager instances. The main application always has a
FocusManager instance.
<p>The FocusManager manages focus from the "component level".
In Flex, a UITextField in a component is the only way to allow keyboard entry
of text. To the Flash Player or AIR, that UITextField has focus. However, from the
FocusManager's perspective the component that parents the UITextField has focus.
Thus there is a distinction between component-level focus and player-level focus.
Application developers generally only have to deal with component-level focus while
component developers must understand player-level focus.</p>
<p>All components that can be managed by the FocusManager must implement
mx.managers.IFocusManagerComponent, whereas objects managed by player-level focus do not.</p>
<p>The FocusManager also managers the concept of a defaultButton, which is
the Button on a form that dispatches a click event when the Enter key is pressed
depending on where focus is at that time.</p>
<p></p><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#defaultButton" class="signatureLink">defaultButton</a> : <a href="../../mx/core/IButton.html">IButton</a><div class="summaryTableDescription">
A reference to the original default Button control.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#defaultButtonEnabled" class="signatureLink">defaultButtonEnabled</a> : Boolean<div class="summaryTableDescription">
A flag that indicates whether the FocusManager should
check for the Enter key being pressed to activate the default button.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#focusPane" class="signatureLink">focusPane</a> : Sprite<div class="summaryTableDescription">
A single Sprite that is moved from container to container
as the focus moves to those containers.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#nextTabIndex" class="signatureLink">nextTabIndex</a> : int<div class="summaryTableDescription">[read-only]
The next unique tab index to use in this tab loop.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#showFocusIndicator" class="signatureLink">showFocusIndicator</a> : Boolean<div class="summaryTableDescription">
A flag that indicates whether to display an indicator that
a component has focus.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#FocusManager()" class="signatureLink">FocusManager</a>(container:<a href="../../mx/managers/IFocusManagerContainer.html">IFocusManagerContainer</a>, popup:Boolean = false)</div><div class="summaryTableDescription">
Constructor.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#activate()" class="signatureLink">activate</a>():void</div><div class="summaryTableDescription">
The SystemManager activates and deactivates a FocusManager
if more than one IFocusManagerContainer is visible at the same time.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#deactivate()" class="signatureLink">deactivate</a>():void</div><div class="summaryTableDescription">
The SystemManager activates and deactivates a FocusManager
if more than one IFocusManagerContainer is visible at the same time.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#findFocusManagerComponent()" class="signatureLink">findFocusManagerComponent</a>(o:InteractiveObject):<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></div><div class="summaryTableDescription">
Returns the IFocusManagerComponent that contains the given object, if any.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getFocus()" class="signatureLink">getFocus</a>():<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></div><div class="summaryTableDescription">
Gets the IFocusManagerComponent component that currently has the focus.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getNextFocusManagerComponent()" class="signatureLink">getNextFocusManagerComponent</a>(backward:Boolean = false):<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></div><div class="summaryTableDescription">
Returns the IFocusManagerComponent that would receive focus
if the user pressed the Tab key to navigate to another component.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#hideFocus()" class="signatureLink">hideFocus</a>():void</div><div class="summaryTableDescription">
Sets showFocusIndicator to false
and removes the visual focus indicator from the focused object, if any.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setFocus()" class="signatureLink">setFocus</a>(o:<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a>):void</div><div class="summaryTableDescription">
Sets focus to an IFocusManagerComponent component.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#showFocus()" class="signatureLink">showFocus</a>():void</div><div class="summaryTableDescription">
Sets showFocusIndicator to true
and draws the visual focus indicator on the focused object, if any.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toString()" class="signatureLink">toString</a>():String</div><div class="summaryTableDescription">[override]
Returns a String representation of the component hosting the FocusManager object,
with the String ".focusManager" appended to the end of the String.</div></td><td class="summaryTableOwnerCol">FocusManager</td></tr></table></div><script language="javascript" type="text/javascript"><!--
showHideInherited();
--></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="defaultButton"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">defaultButton</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>defaultButton:<a href="../../mx/core/IButton.html">IButton</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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 <code>click</code> 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.
<p>This property is managed by Flex containers; do not set it directly
to specify the default button.</p>
<p>The <code>defaultButton</code> must be of class
<code>mx.controls.Button</code> even though this property
is of type <code>IUIComponent</code>.</p>
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get defaultButton():<a href="../../mx/core/IButton.html">IButton</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set defaultButton(value:<a href="../../mx/core/IButton.html">IButton</a>):void</code><br/></div><a name="propertyDetail"></a><a name="defaultButtonEnabled"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">defaultButtonEnabled</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>defaultButtonEnabled:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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 <code>Enter</code> key
set this property to <code>false</code> to disable the Enter
key from dispatching a <code>click</code> event on the
default button, if it exists.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get defaultButtonEnabled():Boolean</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set defaultButtonEnabled(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="focusPane"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">focusPane</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>focusPane:Sprite</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get focusPane():Sprite</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set focusPane(value:Sprite):void</code><br/></div><a name="propertyDetail"></a><a name="nextTabIndex"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">nextTabIndex</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>nextTabIndex:int</code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
The next unique tab index to use in this tab loop.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get nextTabIndex():int</code><br/></div><a name="propertyDetail"></a><a name="showFocusIndicator"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">showFocusIndicator</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>showFocusIndicator:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
A flag that indicates whether to display an indicator that
a component has focus.
If <code>true</code> a component receiving focus
draws a visible indicator that it has focus.
<p>By default, this is <code>false</code> until the user uses
the Tab key, then it is set to <code>true</code>.</p>
<p>In general it is better to use
the <code>showFocus()</code> and <code>hideFocus()</code> methods
to change this property as those methods also update the
visual indicator that a component has focus.</p>
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get showFocusIndicator():Boolean</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set showFocusIndicator(value:Boolean):void</code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="FocusManager()"></a><a name="FocusManager(mx.managers.IFocusManagerContainer,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">FocusManager</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function FocusManager(container:<a href="../../mx/managers/IFocusManagerContainer.html">IFocusManagerContainer</a>, popup:Boolean = false)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p>
Constructor.
<p>A FocusManager manages the focus within the children of an IFocusManagerContainer.
It installs itself in the IFocusManagerContainer during execution
of the constructor.</p>
</p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">container</span>:<a href="../../mx/managers/IFocusManagerContainer.html">IFocusManagerContainer</a></code> &mdash; An IFocusManagerContainer that hosts the FocusManager.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">popup</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code>, indicates that the container
is a popup component and not the main application.
</td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="activate()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">activate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function activate():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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 <code>activate()</code> method on that FocusManager.
The FocusManager that was activated will have its <code>deactivate()</code> method
called prior to the activation of another FocusManager.
<p>The FocusManager adds event handlers that allow it to monitor
focus related keyboard and mouse activity.</p>
</p></div><a name="deactivate()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">deactivate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function deactivate():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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 <code>activate()</code> method on that FocusManager.
The FocusManager that was activated will have its <code>deactivate()</code> method
called prior to the activation of another FocusManager.
<p>The FocusManager removes event handlers that allow it to monitor
focus related keyboard and mouse activity.</p>
</p></div><a name="findFocusManagerComponent()"></a><a name="findFocusManagerComponent(flash.display.InteractiveObject)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">findFocusManagerComponent</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function findFocusManagerComponent(o:InteractiveObject):<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">o</span>:InteractiveObject</code> &mdash; An object that can have player-level focus.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code> &mdash; The IFOcusManagerComponent containing <code>o</code> or
<code>null</code>
</td></tr></table></div><a name="getFocus()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getFocus</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getFocus():<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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.
</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code> &mdash; IFocusManagerComponent object that has focus.
</td></tr></table></div><a name="getNextFocusManagerComponent()"></a><a name="getNextFocusManagerComponent(Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getNextFocusManagerComponent</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getNextFocusManagerComponent(backward:Boolean = false):<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">backward</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code>, return the object
as if the Shift-Tab keys were pressed.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code> &mdash; The component that would receive focus.
</td></tr></table></div><a name="hideFocus()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">hideFocus</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function hideFocus():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Sets <code>showFocusIndicator</code> to <code>false</code>
and removes the visual focus indicator from the focused object, if any.
</p></div><a name="setFocus()"></a><a name="setFocus(mx.managers.IFocusManagerComponent)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setFocus</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setFocus(o:<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a>):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Sets focus to an IFocusManagerComponent component. Does not check for
the components visibility, enabled state, or any other conditions.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">o</span>:<a href="../../mx/managers/IFocusManagerComponent.html">IFocusManagerComponent</a></code> &mdash; A component that can receive focus.
</td></tr></table></p></div><a name="showFocus()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">showFocus</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function showFocus():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Sets <code>showFocusIndicator</code> to <code>true</code>
and draws the visual focus indicator on the focused object, if any.
</p></div><a name="toString()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>override public function toString():String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns a String representation of the component hosting the FocusManager object,
with the String <code>".focusManager"</code> appended to the end of the String.
</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> &mdash; Returns a String representation of the component hosting the FocusManager object,
with the String <code>".focusManager"</code> appended to the end of the String.
</td></tr></table></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 -->