blob: 77d39b707c9151ee6554b6c1848bb8857b2b6694 [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="PopUpManager,mx.managers.PopUpManager,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.PopUpManager</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 = 'PopUpManager - 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/PopUpManager.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">PopUpManager</td><td class="titleTableSubNav" id="subNav" align="right"><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("PopUpManager"); titleBar_setSubNav(false,false,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 PopUpManager</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">PopUpManager <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</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 PopUpManager singleton class creates new top-level windows and
places or removes those windows from the layer on top of all other
visible windows. See the SystemManager for a description of the layering.
It is used for popup dialogs, menus, and dropdowns in the ComboBox control
and in similar components.
<p>The PopUpManager also provides modality, so that windows below the popup
cannot receive mouse events, and also provides an event if the user clicks
the mouse outside the window so the developer can choose to dismiss
the window or warn the user.</p>
<p></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="PopUpManagerChildList.html" target="">PopUpManagerChildList</a></div><br/><hr></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="#addPopUp()" class="signatureLink">addPopUp</a>(window:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a>, parent:DisplayObject, modal:Boolean = false, childList:String = null, moduleFactory:<a href="../../mx/core/IFlexModuleFactory.html">IFlexModuleFactory</a> = null):void</div><div class="summaryTableDescription">[static]
Pops up a top-level window.</div></td><td class="summaryTableOwnerCol">PopUpManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#bringToFront()" class="signatureLink">bringToFront</a>(popUp:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a>):void</div><div class="summaryTableDescription">[static]
Makes sure a popup window is higher than other objects in its child list
The SystemManager does this automatically if the popup is a top level window
and is moused on,
but otherwise you have to take care of this yourself.</div></td><td class="summaryTableOwnerCol">PopUpManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#centerPopUp()" class="signatureLink">centerPopUp</a>(popUp:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a>):void</div><div class="summaryTableDescription">[static]
Centers a popup window over whatever window was used in the call
to the createPopUp() or addPopUp() method.</div></td><td class="summaryTableOwnerCol">PopUpManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#createPopUp()" class="signatureLink">createPopUp</a>(parent:DisplayObject, className:Class, modal:Boolean = false, childList:String = null, moduleFactory:<a href="../../mx/core/IFlexModuleFactory.html">IFlexModuleFactory</a> = null):<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a></div><div class="summaryTableDescription">[static]
Creates a top-level window and places it above other windows in the
z-order.</div></td><td class="summaryTableOwnerCol">PopUpManager</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#removePopUp()" class="signatureLink">removePopUp</a>(popUp:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a>):void</div><div class="summaryTableDescription">[static]
Removes a popup window popped up by
the createPopUp() or addPopUp() method.</div></td><td class="summaryTableOwnerCol">PopUpManager</td></tr></table></div><script language="javascript" type="text/javascript"><!--
showHideInherited();
--></script><div class="MainContent"><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="addPopUp()"></a><a name="addPopUp(mx.core.IFlexDisplayObject,flash.display.DisplayObject,Boolean,String,mx.core.IFlexModuleFactory)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">addPopUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public static function addPopUp(window:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a>, parent:DisplayObject, modal:Boolean = false, childList:String = null, moduleFactory:<a href="../../mx/core/IFlexModuleFactory.html">IFlexModuleFactory</a> = null):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>
Pops up a top-level window.
It is good practice to call <code>removePopUp()</code> to remove popups
created by using the <code>addPopUp()</code> method.
If the class implements IFocusManagerContainer, the window will have its
own FocusManager so that, if the user uses the TAB key to navigate between
controls, only the controls in the window will be accessed.
<p><b>Example</b></p>
<pre>var tw:TitleWindow = new TitleWindow();
tw.title = "My Title";
mx.managers.PopUpManager.addPopUp(tw, pnl, false);</pre>
<p>Creates a popup window using the <code>tw</code> instance of the
TitleWindow class and <code>pnl</code> as the Sprite for determining
where to place the popup.
It is defined to be a non-modal window.</p>
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">window</span>:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a></code> &mdash; The IFlexDisplayObject to be popped up.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">parent</span>:DisplayObject</code> &mdash; DisplayObject to be used for determining which SystemManager's layers
to use and optionally the reference point for centering the new
top level window. It may not be the actual parent of the popup as all popups
are parented by the SystemManager.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">modal</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code>, the window is modal which means that
the user will not be able to interact with other popups until the window
is removed.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">childList</span>:String</code> (default = <code>null</code>)<code></code> &mdash; The child list in which to add the pop-up.
One of <code>PopUpManagerChildList.APPLICATION</code>,
<code>PopUpManagerChildList.POPUP</code>,
or <code>PopUpManagerChildList.PARENT</code> (default).
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">moduleFactory</span>:<a href="../../mx/core/IFlexModuleFactory.html">IFlexModuleFactory</a></code> (default = <code>null</code>)<code></code> &mdash; The moduleFactory where this pop-up should look for
its embedded fonts and style manager.
</td></tr></table></p><p><span class="label">See also</span></p><div class="seeAlso"><a href="PopUpManagerChildList.html" target="">PopUpManagerChildList</a></div></div><a name="bringToFront()"></a><a name="bringToFront(mx.core.IFlexDisplayObject)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">bringToFront</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public static function bringToFront(popUp:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</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>
Makes sure a popup window is higher than other objects in its child list
The SystemManager does this automatically if the popup is a top level window
and is moused on,
but otherwise you have to take care of this yourself.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">popUp</span>:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a></code> &mdash; IFlexDisplayObject representing the popup.
</td></tr></table></p></div><a name="centerPopUp()"></a><a name="centerPopUp(mx.core.IFlexDisplayObject)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">centerPopUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public static function centerPopUp(popUp:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</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>
Centers a popup window over whatever window was used in the call
to the <code>createPopUp()</code> or <code>addPopUp()</code> method.
<p>Note that the position of the popup window may not
change immediately after this call since Flex may wait to measure and layout the
popup window before centering it.</p>
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">popUp</span>:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a></code> &mdash; IFlexDisplayObject representing the popup.
</td></tr></table></p></div><a name="createPopUp()"></a><a name="createPopUp(flash.display.DisplayObject,Class,Boolean,String,mx.core.IFlexModuleFactory)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">createPopUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public static function createPopUp(parent:DisplayObject, className:Class, modal:Boolean = false, childList:String = null, moduleFactory:<a href="../../mx/core/IFlexModuleFactory.html">IFlexModuleFactory</a> = null):<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</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>
Creates a top-level window and places it above other windows in the
z-order.
It is good practice to call the <code>removePopUp()</code> method
to remove popups created by using the <code>createPopUp()</code> method.
If the class implements IFocusManagerContainer, the window will have its
own FocusManager so that, if the user uses the TAB key to navigate between
controls, only the controls in the window will be accessed.
<p><b>Example</b></p>
<pre>pop = mx.managers.PopUpManager.createPopUp(pnl, TitleWindow, false); </pre>
<p>Creates a popup window based on the TitleWindow class, using <code>pnl</code> as the MovieClip
for determining where to place the popup. It is defined to be a non-modal window
meaning that other windows can receive mouse events</p>
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">parent</span>:DisplayObject</code> &mdash; DisplayObject to be used for determining which SystemManager's layers
to use and optionally the reference point for centering the new
top level window. It may not be the actual parent of the popup as all popups
are parented by the SystemManager.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">className</span>:Class</code> &mdash; Class of object that is to be created for the popup.
The class must implement IFlexDisplayObject.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">modal</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code>, the window is modal which means that
the user will not be able to interact with other popups until the window
is removed.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">childList</span>:String</code> (default = <code>null</code>)<code></code> &mdash; The child list in which to add the popup.
One of <code>PopUpManagerChildList.APPLICATION</code>,
<code>PopUpManagerChildList.POPUP</code>,
or <code>PopUpManagerChildList.PARENT</code> (default).
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">moduleFactory</span>:<a href="../../mx/core/IFlexModuleFactory.html">IFlexModuleFactory</a></code> (default = <code>null</code>)<code></code> &mdash; The moduleFactory where this pop-up should look for
its embedded fonts and style manager.
</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/core/IFlexDisplayObject.html">IFlexDisplayObject</a></code> &mdash; Reference to new top-level window.
</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="PopUpManagerChildList.html" target="">PopUpManagerChildList</a></div></div><a name="removePopUp()"></a><a name="removePopUp(mx.core.IFlexDisplayObject)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">removePopUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public static function removePopUp(popUp:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</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>
Removes a popup window popped up by
the <code>createPopUp()</code> or <code>addPopUp()</code> method.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">popUp</span>:<a href="../../mx/core/IFlexDisplayObject.html">IFlexDisplayObject</a></code> &mdash; The IFlexDisplayObject representing the popup window.
</td></tr></table></p></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 -->