Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.util.Floating.html
1 <!DOCTYPE html><html><head><title>Ext.util.Floating | 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.util.Floating',
13         docClass: 'Ext.util.Floating',
14         docReq: 'Ext.util.Floating',
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 = 'Floating.html#Ext-util.Floating';
33     clsInfo = {"methods":["alignTo","center","doConstrain","setActive","toBack","toFront"],"cfgs":["focusOnToFront","shadow"],"properties":[],"events":[],"subclasses":[]};
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/Floating.html#Ext-util.Floating" target="_blank">Ext.util.Floating</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><p>A mixin to add floating capability to a Component</p>
38 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-focusOnToFront" class="member f ni"><a href="Ext.util.Floating.html#config-focusOnToFront" rel="config-focusOnToFront" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-cfg-focusOnToFront" class="viewSource">view source</a></div><a name="focusOnToFront"></a><a name="config-focusOnToFront"></a><a href="Ext.util.Floating.html#" rel="config-focusOnToFront" class="cls expand">focusOnToFront</a><span> : Boolean</span></div><div class="description"><div class="short">Specifies whether the floated component should be automatically focused when it is
39 brought to the front. Defaults to ...</div><div class="long"><p>Specifies whether the floated component should be automatically <a href="Ext.util.Floating.html#focus" rel="Ext.util.Floating#focus" class="docClass">focused</a> when it is
40 <a href="Ext.util.Floating.html#toFront" rel="Ext.util.Floating#toFront" class="docClass">brought to the front</a>. Defaults to true.</p>
41 </div></div></div><div id="config-shadow" class="member ni"><a href="Ext.util.Floating.html#config-shadow" rel="config-shadow" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-cfg-shadow" class="viewSource">view source</a></div><a name="shadow"></a><a name="config-shadow"></a><a href="Ext.util.Floating.html#" rel="config-shadow" class="cls expand">shadow</a><span> : String/Boolean</span></div><div class="description"><div class="short">Specifies whether the floating component should be given a shadow. Set to
42 true to automatically create an Ext.Shadow,...</div><div class="long"><p>Specifies whether the floating component should be given a shadow. Set to
43 <tt>true</tt> to automatically create an <a href="Ext.Shadow.html" rel="Ext.Shadow" class="docClass">Ext.Shadow</a>, or a string indicating the
44 shadow's display <a href="Ext.Shadow.html#mode" rel="Ext.Shadow#mode" class="docClass">Ext.Shadow.mode</a>. Set to <tt>false</tt> to disable the shadow.
45 (Defaults to <tt>'sides'</tt>.)</p>
46 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-alignTo" class="member f ni"><a href="Ext.util.Floating.html#method-alignTo" rel="method-alignTo" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-method-alignTo" class="viewSource">view source</a></div><a name="alignTo"></a><a name="method-alignTo"></a><a href="Ext.util.Floating.html#" rel="method-alignTo" class="cls expand">alignTo</a>(
47 <span class="pre">Mixed element, String position, [Array offsets]</span>)
48  : Component</div><div class="description"><div class="short"><p>Aligns this floating Component to the specified element</p>
49 </div><div class="long"><p>Aligns this floating Component to the specified element</p>
50 <h3 class="pa">Parameters</h3><ul><li><span class="pre">element</span> : Mixed<div class="sub-desc"><p>The element or <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> to align to. If passing a component, it must
51 be a omponent instance. If a string id is passed, it will be used as an element id.</p>
52 </div></li><li><span class="pre">position</span> : String<div class="sub-desc"><p>(optional, defaults to "tl-bl?") The position to align to (see <a href="Ext.core.Element.html#alignTo" rel="Ext.core.Element#alignTo" class="docClass">Ext.core.Element.alignTo</a> for more details).</p>
53 </div></li><li><span class="pre">offsets</span> : Array<div class="sub-desc"><p>(optional) Offset the positioning by [x, y]</p>
54 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Component</span>&nbsp; &nbsp;<p>this</p>
55 </li></ul></div></div></div><div id="method-center" class="member ni"><a href="Ext.util.Floating.html#method-center" rel="method-center" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-method-center" class="viewSource">view source</a></div><a name="center"></a><a name="method-center"></a><a href="Ext.util.Floating.html#" rel="method-center" class="cls expand">center</a> : Component</div><div class="description"><div class="short"><p>Center this Component in its container.</p>
56 </div><div class="long"><p>Center this Component in its container.</p>
57 <h3 class="pa">Returns</h3><ul><li><span class="pre">Component</span>&nbsp; &nbsp;<p>this</p>
58 </li></ul></div></div></div><div id="method-doConstrain" class="member ni"><a href="Ext.util.Floating.html#method-doConstrain" rel="method-doConstrain" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-method-doConstrain" class="viewSource">view source</a></div><a name="doConstrain"></a><a name="method-doConstrain"></a><a href="Ext.util.Floating.html#" rel="method-doConstrain" class="cls expand">doConstrain</a>(
59 <span class="pre">Mixed constrainTo</span>)
60  : void</div><div class="description"><div class="short">Moves this floating Component into a constrain region.
61
62
63 By default, this Component is constrained to be within the c...</div><div class="long"><p>Moves this floating Component into a constrain region.</p>
64
65
66 <p>By default, this Component is constrained to be within the container it was added to, or the element
67 it was rendered to.</p>
68
69
70 <p>An alternative constraint may be passed.</p>
71
72 <h3 class="pa">Parameters</h3><ul><li><span class="pre">constrainTo</span> : Mixed<div class="sub-desc"><p>Optional. The Element or <a href="Ext.util.Region.html" rel="Ext.util.Region" class="docClass">Region</a> into which this Component is to be constrained.</p>
73 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
74 </li></ul></div></div></div><div id="method-setActive" class="member ni"><a href="Ext.util.Floating.html#method-setActive" rel="method-setActive" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-method-setActive" class="viewSource">view source</a></div><a name="setActive"></a><a name="method-setActive"></a><a href="Ext.util.Floating.html#" rel="method-setActive" class="cls expand">setActive</a>(
75 <span class="pre">Boolean active, Component newActive</span>)
76  : void</div><div class="description"><div class="short">This method is called internally by Ext.ZIndexManager to signal that a floating
77 Component has either been moved to th...</div><div class="long"><p>This method is called internally by <a href="Ext.ZIndexManager.html" rel="Ext.ZIndexManager" class="docClass">Ext.ZIndexManager</a> to signal that a floating
78 Component has either been moved to the top of its zIndex stack, or pushed from the top of its zIndex stack.</p>
79
80
81 <p>If a <i>Window</i> is superceded by another Window, deactivating it hides its shadow.</p>
82
83
84 <p>This method also fires the <a href="Ext.util.Floating.html#activate" rel="Ext.util.Floating#activate" class="docClass">activate</a> or <a href="Ext.util.Floating.html#deactivate" rel="Ext.util.Floating#deactivate" class="docClass">deactivate</a> event depending on which action occurred.</p>
85
86 <h3 class="pa">Parameters</h3><ul><li><span class="pre">active</span> : Boolean<div class="sub-desc"><p>True to activate the Component, false to deactivate it (defaults to false)</p>
87 </div></li><li><span class="pre">newActive</span> : Component<div class="sub-desc"><p>The newly active Component which is taking over topmost zIndex position.</p>
88 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
89 </li></ul></div></div></div><div id="method-toBack" class="member ni"><a href="Ext.util.Floating.html#method-toBack" rel="method-toBack" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-method-toBack" class="viewSource">view source</a></div><a name="toBack"></a><a name="method-toBack"></a><a href="Ext.util.Floating.html#" rel="method-toBack" class="cls expand">toBack</a> : Component</div><div class="description"><div class="short"><p>Sends this Component to the back of (lower z-index than) any other visible windows</p>
90 </div><div class="long"><p>Sends this Component to the back of (lower z-index than) any other visible windows</p>
91 <h3 class="pa">Returns</h3><ul><li><span class="pre">Component</span>&nbsp; &nbsp;<p>this</p>
92 </li></ul></div></div></div><div id="method-toFront" class="member ni"><a href="Ext.util.Floating.html#method-toFront" rel="method-toFront" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Floating.html" class="definedIn docClass">Ext.util.Floating</a><br/><a href="../source/Floating.html#Ext-util.Floating-method-toFront" class="viewSource">view source</a></div><a name="toFront"></a><a name="method-toFront"></a><a href="Ext.util.Floating.html#" rel="method-toFront" class="cls expand">toFront</a>(
93 <span class="pre">[Boolean preventFocus]</span>)
94  : Component</div><div class="description"><div class="short">Brings this floating Component to the front of any other visible, floating Components managed by the same ZIndexManag...</div><div class="long"><p>Brings this floating Component to the front of any other visible, floating Components managed by the same <a href="Ext.ZIndexManager.html" rel="Ext.ZIndexManager" class="docClass">ZIndexManager</a></p>
95
96
97 <p>If this Component is modal, inserts the modal mask just below this Component in the z-index stack.</p>
98
99 <h3 class="pa">Parameters</h3><ul><li><span class="pre">preventFocus</span> : Boolean<div class="sub-desc"><p>(optional) Specify <code>true</code> to prevent the Component from being focused.</p>
100 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Component</span>&nbsp; &nbsp;<p>this</p>
101 </li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>