Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.ZIndexManager.html
1 <!DOCTYPE html><html><head><title>Ext.ZIndexManager | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.ZIndexManager',
13         docClass: 'Ext.ZIndexManager',
14         docReq: 'Ext.ZIndexManager',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'ZIndexManager.html#Ext-ZIndexManager';
33     clsInfo = {"methods":["ZIndexManager","bringToFront","each","eachBottomUp","eachTopDown","get","getActive","getBy","hideAll","register","sendToBack","unregister"],"cfgs":[],"properties":[],"events":[],"subclasses":["Ext.WindowManager"]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/ZIndexManager.html#Ext-ZIndexManager" target="_blank">Ext.ZIndexManager</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><p>A class that manages a group of <a href="Ext.Component.html#floating" rel="Ext.Component#floating" class="docClass">Ext.Component.floating</a> Components and provides z-order management,
38 and Component activation behavior, including masking below the active (topmost) Component.</p>
39
40
41 <p><a href="Ext.Component.html#floating" rel="Ext.Component#floating" class="docClass">Floating</a> Components which are rendered directly into the document (Such as <a href="Ext.window.Window.html" rel="Ext.window.Window" class="docClass">Window</a>s which are
42 <a href="Ext.Component.html#show" rel="Ext.Component#show" class="docClass">show</a>n are managed by a <a href="Ext.WindowManager.html" rel="Ext.WindowManager" class="docClass">global instance</a>.</p>
43
44
45 <p><a href="Ext.Component.html#floating" rel="Ext.Component#floating" class="docClass">Floating</a> Components which are descendants of <a href="Ext.Component.html#floating" rel="Ext.Component#floating" class="docClass">floating</a> <i>Containers</i>
46 (For example a {<a href="Ext.view.BoundList.html" rel="Ext.view.BoundList" class="docClass">Ext.view.BoundList</a> BoundList} within an <a href="Ext.window.Window.html" rel="Ext.window.Window" class="docClass">Window</a>, or a <a href="Ext.menu.Menu.html" rel="Ext.menu.Menu" class="docClass">Menu</a>),
47 are managed by a ZIndexManager owned by that floating Container. So ComboBox dropdowns within Windows will have managed z-indices
48 guaranteed to be correct, relative to the Window.</p>
49
50 <div class="members"><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-ZIndexManager" class="member f ni"><a href="Ext.ZIndexManager.html#method-ZIndexManager" rel="method-ZIndexManager" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-constructor" class="viewSource">view source</a></div><a name="ZIndexManager"></a><a name="method-ZIndexManager"></a><a href="Ext.ZIndexManager.html#" rel="method-ZIndexManager" class="cls expand">ZIndexManager</a> : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
51 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
52 </li></ul></div></div></div><div id="method-bringToFront" class="member ni"><a href="Ext.ZIndexManager.html#method-bringToFront" rel="method-bringToFront" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-bringToFront" class="viewSource">view source</a></div><a name="bringToFront"></a><a name="method-bringToFront"></a><a href="Ext.ZIndexManager.html#" rel="method-bringToFront" class="cls expand">bringToFront</a>(
53 <span class="pre">String/Object comp</span>)
54  : Boolean</div><div class="description"><div class="short"><p>Brings the specified Component to the front of any other active Components in this ZIndexManager.</p>
55 </div><div class="long"><p>Brings the specified Component to the front of any other active Components in this ZIndexManager.</p>
56 <h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : String/Object<div class="sub-desc"><p>The id of the Component or a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p>
57 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the dialog was brought to the front, else false
58 if it was already in front</p>
59 </li></ul></div></div></div><div id="method-each" class="member ni"><a href="Ext.ZIndexManager.html#method-each" rel="method-each" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-each" class="viewSource">view source</a></div><a name="each"></a><a name="method-each"></a><a href="Ext.ZIndexManager.html#" rel="method-each" class="cls expand">each</a>(
60 <span class="pre">Function fn, [Object scope]</span>)
61  : void</div><div class="description"><div class="short">Executes the specified function once for every Component in this ZIndexManager, passing each
62 Component as the only pa...</div><div class="long"><p>Executes the specified function once for every Component in this ZIndexManager, passing each
63 Component as the only parameter. Returning false from the function will stop the iteration.</p>
64 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each item</p>
65 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the current Component in the iteration.</p>
66 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
67 </li></ul></div></div></div><div id="method-eachBottomUp" class="member ni"><a href="Ext.ZIndexManager.html#method-eachBottomUp" rel="method-eachBottomUp" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-eachBottomUp" class="viewSource">view source</a></div><a name="eachBottomUp"></a><a name="method-eachBottomUp"></a><a href="Ext.ZIndexManager.html#" rel="method-eachBottomUp" class="cls expand">eachBottomUp</a>(
68 <span class="pre">Function fn, [Object scope]</span>)
69  : void</div><div class="description"><div class="short">Executes the specified function once for every Component in this ZIndexManager, passing each
70 Component as the only pa...</div><div class="long"><p>Executes the specified function once for every Component in this ZIndexManager, passing each
71 Component as the only parameter. Returning false from the function will stop the iteration.
72 The components are passed to the function starting at the bottom and proceeding to the top.</p>
73 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each item</p>
74 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function
75 is executed. Defaults to the current Component in the iteration.</p>
76 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
77 </li></ul></div></div></div><div id="method-eachTopDown" class="member ni"><a href="Ext.ZIndexManager.html#method-eachTopDown" rel="method-eachTopDown" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-eachTopDown" class="viewSource">view source</a></div><a name="eachTopDown"></a><a name="method-eachTopDown"></a><a href="Ext.ZIndexManager.html#" rel="method-eachTopDown" class="cls expand">eachTopDown</a>(
78 <span class="pre">Function fn, [Object scope]</span>)
79  : void</div><div class="description"><div class="short">Executes the specified function once for every Component in this ZIndexManager, passing each
80 Component as the only pa...</div><div class="long"><p>Executes the specified function once for every Component in this ZIndexManager, passing each
81 Component as the only parameter. Returning false from the function will stop the iteration.
82 The components are passed to the function starting at the top and proceeding to the bottom.</p>
83 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each item</p>
84 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function
85 is executed. Defaults to the current Component in the iteration.</p>
86 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
87 </li></ul></div></div></div><div id="method-get" class="member ni"><a href="Ext.ZIndexManager.html#method-get" rel="method-get" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-get" class="viewSource">view source</a></div><a name="get"></a><a name="method-get"></a><a href="Ext.ZIndexManager.html#" rel="method-get" class="cls expand">get</a>(
88 <span class="pre">String/Object id</span>)
89  : Ext.Component</div><div class="description"><div class="short"><p>Gets a registered Component by id.</p>
90 </div><div class="long"><p>Gets a registered Component by id.</p>
91 <h3 class="pa">Parameters</h3><ul><li><span class="pre">id</span> : String/Object<div class="sub-desc"><p>The id of the Component or a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p>
92 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;
93 </li></ul></div></div></div><div id="method-getActive" class="member ni"><a href="Ext.ZIndexManager.html#method-getActive" rel="method-getActive" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-getActive" class="viewSource">view source</a></div><a name="getActive"></a><a name="method-getActive"></a><a href="Ext.ZIndexManager.html#" rel="method-getActive" class="cls expand">getActive</a> : Ext.Component</div><div class="description"><div class="short"><p>Gets the currently-active Component in this ZIndexManager.</p>
94 </div><div class="long"><p>Gets the currently-active Component in this ZIndexManager.</p>
95 <h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;<p>The active Component</p>
96 </li></ul></div></div></div><div id="method-getBy" class="member ni"><a href="Ext.ZIndexManager.html#method-getBy" rel="method-getBy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-getBy" class="viewSource">view source</a></div><a name="getBy"></a><a name="method-getBy"></a><a href="Ext.ZIndexManager.html#" rel="method-getBy" class="cls expand">getBy</a>(
97 <span class="pre">Function fn, [Object scope]</span>)
98  : Array</div><div class="description"><div class="short">Returns zero or more Components in this ZIndexManager using the custom search function passed to this method.
99 The fun...</div><div class="long"><p>Returns zero or more Components in this ZIndexManager using the custom search function passed to this method.
100 The function should accept a single <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> reference as its only argument and should
101 return true if the Component matches the search criteria, otherwise it should return false.</p>
102 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The search function</p>
103 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the Component being tested.
104 that gets passed to the function if not specified)</p>
105 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>An array of zero or more matching windows</p>
106 </li></ul></div></div></div><div id="method-hideAll" class="member ni"><a href="Ext.ZIndexManager.html#method-hideAll" rel="method-hideAll" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-hideAll" class="viewSource">view source</a></div><a name="hideAll"></a><a name="method-hideAll"></a><a href="Ext.ZIndexManager.html#" rel="method-hideAll" class="cls expand">hideAll</a> : void</div><div class="description"><div class="short"><p>Hides all Components managed by this ZIndexManager.</p>
107 </div><div class="long"><p>Hides all Components managed by this ZIndexManager.</p>
108 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
109 </li></ul></div></div></div><div id="method-register" class="member ni"><a href="Ext.ZIndexManager.html#method-register" rel="method-register" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-register" class="viewSource">view source</a></div><a name="register"></a><a name="method-register"></a><a href="Ext.ZIndexManager.html#" rel="method-register" class="cls expand">register</a>(
110 <span class="pre">Component comp</span>)
111  : void</div><div class="description"><div class="short">Registers a floating Ext.Component with this ZIndexManager. This should not
112 need to be called under normal circumstan...</div><div class="long"><p>Registers a floating <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> with this ZIndexManager. This should not
113 need to be called under normal circumstances. Floating Components (such as Windows, BoundLists and Menus) are automatically registered
114 with a <a href="Ext.Component.html#zIndexManager" rel="Ext.Component#zIndexManager" class="docClass">zIndexManager</a> at render time.</p>
115
116
117 <p>Where this may be useful is moving Windows between two ZIndexManagers. For example,
118 to bring the Ext.MessageBox dialog under the same manager as the Desktop's
119 ZIndexManager in the desktop sample app:</p>
120
121
122 <p><code></p>
123
124 <pre>MyDesktop.getDesktop().getManager().register(Ext.MessageBox);
125 </pre>
126
127
128 <p></code></p>
129 <h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : Component<div class="sub-desc"><p>The Component to register.</p>
130 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
131 </li></ul></div></div></div><div id="method-sendToBack" class="member ni"><a href="Ext.ZIndexManager.html#method-sendToBack" rel="method-sendToBack" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-sendToBack" class="viewSource">view source</a></div><a name="sendToBack"></a><a name="method-sendToBack"></a><a href="Ext.ZIndexManager.html#" rel="method-sendToBack" class="cls expand">sendToBack</a>(
132 <span class="pre">String/Object comp</span>)
133  : Ext.Component</div><div class="description"><div class="short"><p>Sends the specified Component to the back of other active Components in this ZIndexManager.</p>
134 </div><div class="long"><p>Sends the specified Component to the back of other active Components in this ZIndexManager.</p>
135 <h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : String/Object<div class="sub-desc"><p>The id of the Component or a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p>
136 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;<p>The Component</p>
137 </li></ul></div></div></div><div id="method-unregister" class="member ni"><a href="Ext.ZIndexManager.html#method-unregister" rel="method-unregister" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-unregister" class="viewSource">view source</a></div><a name="unregister"></a><a name="method-unregister"></a><a href="Ext.ZIndexManager.html#" rel="method-unregister" class="cls expand">unregister</a>(
138 <span class="pre">Component comp</span>)
139  : void</div><div class="description"><div class="short">Unregisters a Ext.Component from this ZIndexManager. This should not
140 need to be called. Components are automatically ...</div><div class="long"><p>Unregisters a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> from this ZIndexManager. This should not
141 need to be called. Components are automatically unregistered upon destruction.
142 See <a href="Ext.ZIndexManager.html#register" rel="Ext.ZIndexManager#register" class="docClass">register</a>.</p>
143
144 <h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : Component<div class="sub-desc"><p>The Component to unregister.</p>
145 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
146 </li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>