1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.BoxComponent</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.BoxComponent-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.BoxComponent-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.BoxComponent-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.BoxComponent-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <div class="inheritance res-block">
46 <pre class="res-block-inner"><a href="./Roo.Component.html#constructor" roo:cls="Roo.Component.html#constructor">Roo.Component</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.BoxComponent
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
57 Class Roo.BoxComponent
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_BoxComponent.js.html">Roo/BoxComponent.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">BoxComponent</td></tr>
74 <tr><td class="label">Extends:</td><td class="hd-info">
75 <a href="./Roo.Component.html#constructor" roo:cls="Roo.Component.html#constructor">Roo.Component</a>
83 <!-- ============================== class summary ========================== -->
84 <div class="description">
85 Base class for any visual {<b>link</b> Roo.Component} that uses a box container. BoxComponent provides automatic box<br/>model adjustments for sizing and positioning and will work correctly withnin the Component rendering model. All<br/>container classes should subclass BoxComponent so that they will work consistently when nested within other Ext<br/>layout containers.
89 <!-- ============================== Class comment block... ========================== -->
91 <div class="comments">
92 <b>Class Comments / Notes</B> =>
93 <u onclick="parent.CommentDialog.showCommentId = 'Roo.BoxComponent';">[Add Your comment/notes about this class]</u>
95 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
96 src="/blog.php/GtkDjsComments/Roo.BoxComponent.html"></iframe>
101 <!-- ============================== config options ========================== -->
106 <div class="hr"></div>
107 <a id="Roo.BoxComponent-configs"></a>
113 <table cellspacing="0" class="member-table">
114 <caption>Config Options (Usually are also Properties)</caption>
118 <th class="sig-header" colspan="2">Options</th>
120 <th class="msource-header">Defined By</th>
127 <tr class="config-row expandable config-row-alt0 notInherited">
128 <td class="micon"><a class="exi" href="#expand"> </a></td>
131 <a id="Roo.BoxComponent-cfg-height" name=".height"></a>
132 <div class="fixedFont">
133 <b class="itemname">height</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
139 <div class="short">height (optional) size of component</div>
143 <div class="long">height (optional) size of component</div>
157 <tr class="config-row expandable config-row-alt1 notInherited">
158 <td class="micon"><a class="exi" href="#expand"> </a></td>
161 <a id="Roo.BoxComponent-cfg-width" name=".width"></a>
162 <div class="fixedFont">
163 <b class="itemname">width</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
169 <div class="short">width (optional) size of component</div>
173 <div class="long">width (optional) size of component</div>
197 <!-- ============================== public properties ==================== -->
201 <a id="Roo.BoxComponent-props"></a>
207 <table cellspacing="0" class="member-table">
208 <caption class="Empty">Public Properties - Has None</caption>
214 <!-- ============================== methods summary / details ======================== -->
217 <a id="Roo.BoxComponent-methods"></a>
218 <!-- constructor?? -->
225 <!-- then dynamics first -->
232 <table cellspacing="0" class="member-table">
233 <caption>Public Methods</caption>
235 <th class="sig-header" colspan="2">Method</th>
236 <th class="msource-header">Defined By</th>
246 <tr class="method-row config-row-alt0 expandable notInherited">
247 <td class="micon"><a class="exi" href="#expand"> </a></td>
251 <a id="Roo-method-BoxComponent" name=".BoxComponent"></a>
252 <div class="fixedFont">
253 <span class="attributes">new <B>Roo.</B></span><b class="itemname">BoxComponent</b>
255 (<a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>/String/Object <B><i>config</i></B>)
263 <div class="short">Create a new Roo.BoxComponent</div>
270 Create a new Roo.BoxComponent
273 <dl class="detailList">
274 <dt class="heading">Parameters:</dt>
277 <span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>/String/Object</span> <b>config</b>
280 <dd>The configuration options.</dd>
304 <tr class="method-row config-row-alt1 expandable notInherited">
305 <td class="micon"><a class="exi" href="#expand"> </a></td>
309 <a id="Roo.BoxComponent-method-getBox" name=".getBox"></a>
310 <div class="fixedFont">
311 <span class="attributes"></span><b class="itemname">getBox</b>
313 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>local</i></B>)
320 <div class="short">Gets the current box measurements of the component's underlying element.</div>
326 Gets the current box measurements of the component's underlying element.
333 <dl class="detailList">
334 <dt class="heading">Parameters:</dt>
337 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>local</b>
340 <dd>(optional) If true the element's left and top are returned instead of page XY (defaults to false)</dd>
366 <tr class="method-row config-row-alt0 expandable notInherited">
367 <td class="micon"><a class="exi" href="#expand"> </a></td>
371 <a id="Roo.BoxComponent-method-getPosition" name=".getPosition"></a>
372 <div class="fixedFont">
373 <span class="attributes"></span><b class="itemname">getPosition</b>
375 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>local</i></B>)
381 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
390 <div class="short">Gets the current XY position of the component's underlying element.</div>
396 Gets the current XY position of the component's underlying element.
403 <dl class="detailList">
404 <dt class="heading">Parameters:</dt>
407 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>local</b>
410 <dd>(optional) If true the element's left and top are returned instead of page XY (defaults to false)</dd>
418 <dl class="detailList">
419 <dt class="heading">Returns:</dt>
421 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> The XY position of the element (e.g., [100, 200])</dd>
443 <tr class="method-row config-row-alt1 expandable notInherited">
444 <td class="micon"><a class="exi" href="#expand"> </a></td>
448 <a id="Roo.BoxComponent-method-getSize" name=".getSize"></a>
449 <div class="fixedFont">
450 <span class="attributes"></span><b class="itemname">getSize</b>
458 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
467 <div class="short">Gets the current size of the component's underlying element.</div>
473 Gets the current size of the component's underlying element.
484 <dl class="detailList">
485 <dt class="heading">Returns:</dt>
487 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> An object containing the element's size {width: (element width), height: (element height)}</dd>
509 <tr class="method-row config-row-alt0 expandable notInherited">
510 <td class="micon"><a class="exi" href="#expand"> </a></td>
514 <a id="Roo.BoxComponent-method-onPosition" name=".onPosition"></a>
515 <div class="fixedFont">
516 <span class="attributes"></span><b class="itemname">onPosition</b>
518 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>x</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>y</i></B>)
525 <div class="short">Called after the component is moved, this method is empty by default but can be implemented by any<br/>subclass that needs to perform custom logic after a move occurs.</div>
531 Called after the component is moved, this method is empty by default but can be implemented by any<br/>subclass that needs to perform custom logic after a move occurs.
538 <dl class="detailList">
539 <dt class="heading">Parameters:</dt>
542 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>x</b>
545 <dd>The new x position</dd>
548 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>y</b>
551 <dd>The new y position</dd>
577 <tr class="method-row config-row-alt1 expandable notInherited">
578 <td class="micon"><a class="exi" href="#expand"> </a></td>
582 <a id="Roo.BoxComponent-method-onResize" name=".onResize"></a>
583 <div class="fixedFont">
584 <span class="attributes"></span><b class="itemname">onResize</b>
586 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>adjWidth</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>adjHeight</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>rawWidth</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>rawHeight</i></B>)
593 <div class="short">Called after the component is resized, this method is empty by default but can be implemented by any<br/>subclass that needs to perform custom logic after a resize occurs.</div>
599 Called after the component is resized, this method is empty by default but can be implemented by any<br/>subclass that needs to perform custom logic after a resize occurs.
606 <dl class="detailList">
607 <dt class="heading">Parameters:</dt>
610 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>adjWidth</b>
613 <dd>The box-adjusted width that was set</dd>
616 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>adjHeight</b>
619 <dd>The box-adjusted height that was set</dd>
622 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>rawWidth</b>
625 <dd>The width that was originally specified</dd>
628 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>rawHeight</b>
631 <dd>The height that was originally specified</dd>
657 <tr class="method-row config-row-alt0 expandable notInherited">
658 <td class="micon"><a class="exi" href="#expand"> </a></td>
662 <a id="Roo.BoxComponent-method-setPagePosition" name=".setPagePosition"></a>
663 <div class="fixedFont">
664 <span class="attributes"></span><b class="itemname">setPagePosition</b>
666 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>x</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>y</i></B>)
673 <div class="short">Sets the page XY position of the component.</div>
679 Sets the page XY position of the component. To set the left and top instead, use {<b>link</b> <b>setPosition</b>}.<br/>This method fires the move event.
686 <dl class="detailList">
687 <dt class="heading">Parameters:</dt>
690 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>x</b>
693 <dd>The new x position</dd>
696 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>y</b>
699 <dd>The new y position</dd>
725 <tr class="method-row config-row-alt1 expandable notInherited">
726 <td class="micon"><a class="exi" href="#expand"> </a></td>
730 <a id="Roo.BoxComponent-method-setPosition" name=".setPosition"></a>
731 <div class="fixedFont">
732 <span class="attributes"></span><b class="itemname">setPosition</b>
734 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>left</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>top</i></B>)
741 <div class="short">Sets the left and top of the component.</div>
747 Sets the left and top of the component. To set the page XY position instead, use {<b>link</b> <b>setPagePosition</b>}.<br/>This method fires the move event.
754 <dl class="detailList">
755 <dt class="heading">Parameters:</dt>
758 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>left</b>
761 <dd>The new left</dd>
764 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>top</b>
793 <tr class="method-row config-row-alt0 expandable notInherited">
794 <td class="micon"><a class="exi" href="#expand"> </a></td>
798 <a id="Roo.BoxComponent-method-setSize" name=".setSize"></a>
799 <div class="fixedFont">
800 <span class="attributes"></span><b class="itemname">setSize</b>
802 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>/Object <B><i>width</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>height</i></B>)
808 <a href="./Roo.BoxComponent.html#constructor" roo:cls="Roo.BoxComponent.html#constructor">Roo.BoxComponent</a>
817 <div class="short">Sets the width and height of the component.</div>
823 Sets the width and height of the component. This method fires the resize event. This method can accept<br/>either width and height as separate numeric arguments, or you can pass a size object like {width:10, height:20}.
830 <dl class="detailList">
831 <dt class="heading">Parameters:</dt>
834 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>/Object</span> <b>width</b>
837 <dd>The new width to set, or a size object in the format {width, height}</dd>
840 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>height</b>
843 <dd>The new height to set (not required if a size object is passed as the first arg)</dd>
851 <dl class="detailList">
852 <dt class="heading">Returns:</dt>
854 <dd><span class="fixedFont"><a href="./Roo.BoxComponent.html#constructor" roo:cls="Roo.BoxComponent.html#constructor">Roo.BoxComponent</a></span> this</dd>
876 <tr class="method-row config-row-alt1 expandable notInherited">
877 <td class="micon"><a class="exi" href="#expand"> </a></td>
881 <a id="Roo.BoxComponent-method-syncSize" name=".syncSize"></a>
882 <div class="fixedFont">
883 <span class="attributes"></span><b class="itemname">syncSize</b>
892 <div class="short">Force the component's size to recalculate based on the underlying element's current height and width.</div>
898 Force the component's size to recalculate based on the underlying element's current height and width.
927 <tr class="method-row config-row-alt0 expandable notInherited">
928 <td class="micon"><a class="exi" href="#expand"> </a></td>
932 <a id="Roo.BoxComponent-method-updateBox" name=".updateBox"></a>
933 <div class="fixedFont">
934 <span class="attributes"></span><b class="itemname">updateBox</b>
936 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>box</i></B>)
943 <div class="short">Sets the current box measurements of the component's underlying element.</div>
949 Sets the current box measurements of the component's underlying element.
956 <dl class="detailList">
957 <dt class="heading">Parameters:</dt>
960 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>box</b>
963 <dd>An object in the format {x, y, width, height}</dd>
992 <!-- ============================== events summary / details ======================== -->
995 <a id="Roo.BoxComponent-events"></a>
1004 <table cellspacing="0" class="member-table">
1005 <caption>Events</caption>
1008 <th class="sig-header" colspan="2">Event</th>
1009 <th class="msource-header">Defined By</th>
1018 <tr class="method-row expandable config-row-alt0 notInherited">
1019 <td class="micon"><a class="exi" href="#expand"> </a></td>
1022 <a id="Roo.BoxComponent-event-*move"></a>
1024 <div class="fixedFont">
1025 <b class="itemname">move</b> (<a href="./Roo.Component.html#constructor" roo:cls="Roo.Component.html#constructor">Roo.Component</a> <B><i>this</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>x</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>y</i></B>)
1031 <div class="short">Fires after the component is moved.
1037 Fires after the component is moved.
1043 <dl class="detailList">
1044 <dt class="heading">Parameters:</dt>
1047 <span class="fixedFont"><a href="./Roo.Component.html#constructor" roo:cls="Roo.Component.html#constructor">Roo.Component</a></span> <b>this</b>
1053 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>x</b>
1056 <dd>The new x position</dd>
1059 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>y</b>
1062 <dd>The new y position</dd>
1080 <td class="msource">
1085 <tr class="method-row expandable config-row-alt1 notInherited">
1086 <td class="micon"><a class="exi" href="#expand"> </a></td>
1089 <a id="Roo.BoxComponent-event-*resize"></a>
1091 <div class="fixedFont">
1092 <b class="itemname">resize</b> (<a href="./Roo.Component.html#constructor" roo:cls="Roo.Component.html#constructor">Roo.Component</a> <B><i>this</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>adjWidth</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>adjHeight</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>rawWidth</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>rawHeight</i></B>)
1098 <div class="short">Fires after the component is resized.
1104 Fires after the component is resized.
1110 <dl class="detailList">
1111 <dt class="heading">Parameters:</dt>
1114 <span class="fixedFont"><a href="./Roo.Component.html#constructor" roo:cls="Roo.Component.html#constructor">Roo.Component</a></span> <b>this</b>
1120 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>adjWidth</b>
1123 <dd>The box-adjusted width that was set</dd>
1126 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>adjHeight</b>
1129 <dd>The box-adjusted height that was set</dd>
1132 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>rawWidth</b>
1135 <dd>The width that was originally specified</dd>
1138 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>rawHeight</b>
1141 <dd>The height that was originally specified</dd>
1159 <td class="msource">
1171 <!-- ============================== footer ================================= -->
1172 <div class="fineprint" style="clear:both">
1174 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 16 2010 19:32:43 GMT+0800 (HKT)
1176 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>