webgui/www/extras/yui-ext/docs/output/YAHOO.ext.LayoutManager.html
JT Smith cfd09a5cb6 upgraded to yui 0.12.0
upgraded to yui-ext 0.33 rc2
2006-11-28 02:23:34 +00:00

444 lines
No EOL
25 KiB
HTML

<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YAHOO.ext.LayoutManager</title>
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
</head>
<body>
<div class="body-wrap">
<div class="top-tools"><img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="YAHOO.ext.LayoutManager.html" target="_blank">Print Friendly</a></div>
<h1>Class YAHOO.ext.LayoutManager</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td>YAHOO.ext</td></tr>
<tr><td class="label">Class:</td><td>LayoutManager</td></tr>
<tr><td class="label">Extends:</td><td><a href="YAHOO.ext.util.Observable.html">Observable</a></td></tr>
<tr><td class="label">Subclasses:</td><td><a href="YAHOO.ext.BorderLayout.html">BorderLayout</a></td></tr>
<tr><td class="label">Defined In:</td><td><a href="LayoutManager.js.html">LayoutManager.js</a></td></tr>
</table>
<div class="description">
Base class for layout managers. </div>
<hr />
<a name="properties"></a>
<h2>Public Properties</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Property</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#monitorWindowResize">monitorWindowResize</a> : Boolean</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr>
<td class="mdesc">false to disable window resize monitoring</td>
</tr>
</table>
<a name="methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#addListener">addListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>boolean override</code>]</span>) : void</td>
<td class="msource" rowspan="2"><a href="YAHOO.ext.util.Observable.html#addListener">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Appends an event handler to this element</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#beginUpdate">beginUpdate</a>() : void</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr class="alt">
<td class="mdesc">Suspend the LayoutManager from doing auto-layouts while
making multiple add or remove calls</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#delayedListener">delayedListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Number delay</code>]</span>) : Function</td>
<td class="msource" rowspan="2"><a href="YAHOO.ext.util.Observable.html#delayedListener">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Appends an event handler to this element that is delayed the specified number of milliseconds.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#endUpdate">endUpdate</a>(<code>Boolean noLayout</code>) : void</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr class="alt">
<td class="mdesc">Restore auto-layouts and optionally disable the manager from performing a layout</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#fireEvent">fireEvent</a>(<code>String eventName</code>, <code>Object... args</code>) : Boolean</td>
<td class="msource" rowspan="2"><a href="YAHOO.ext.util.Observable.html#fireEvent">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Fires the specified event with the passed parameters (minus the event name).</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#getEl">getEl</a>() : YAHOO.ext.Element</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the element this layout is bound to.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#getRegion">getRegion</a>(<code>String target</code>) : YAHOO.ext.LayoutRegion</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr>
<td class="mdesc">Returns the specified region.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#getViewSize">getViewSize</a>() : Object</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the size of the current view, This method normalizes document.body and element embedded layouts and
performs ...</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#isUpdating">isUpdating</a>() : Boolean</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr>
<td class="mdesc">Returns true if this layout is currently being updated</td>
</tr>
<tr class="alt">
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#purgeListeners">purgeListeners</a>() : void</td>
<td class="msource" rowspan="2"><a href="YAHOO.ext.util.Observable.html#purgeListeners">Observable</a></td>
</tr>
<tr class="alt">
<td class="mdesc">Removes all listeners for this object</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#removeListener">removeListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
<td class="msource" rowspan="2"><a href="YAHOO.ext.util.Observable.html#removeListener">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Removes a listener</td>
</tr>
</table>
<a name="events"></a>
<h2>Public Events</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Event</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-layout">layout</a> : (<code>YAHOO.ext.LayoutManager this</code>)</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr>
<td class="mdesc">Fires when a layout is performed.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-regioncollapsed">regioncollapsed</a> : (<code>YAHOO.ext.LayoutRegion region</code>)</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr class="alt">
<td class="mdesc">Fires when a region is collapsed.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-regionexpanded">regionexpanded</a> : (<code>YAHOO.ext.LayoutRegion region</code>)</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr>
<td class="mdesc">Fires when a region is expanded.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-regionresized">regionresized</a> : (<code>YAHOO.ext.LayoutRegion region</code>, <code>Number newSize</code>)</td>
<td class="msource" rowspan="2">LayoutManager</td>
</tr>
<tr class="alt">
<td class="mdesc">Fires when the user resizes a region.</td>
</tr>
</table>
<h2 class="mdetail-head">Property Details</h2>
<div class="detail-wrap">
<a name="monitorWindowResize"></a>
<div class="mdetail">
<h3>monitorWindowResize</i></h3>
<code>public Boolean monitorWindowResize</code>
<div class="mdetail-desc">
false to disable window resize monitoring </div>
<div class="mdetail-def">This property is defined by LayoutManager.</div>
</div>
</div>
<h2 class="mdetail-head">Method Details</h2>
<div class="detail-wrap">
<a name="addListener"></a>
<div class="mdetail">
<h3>addListener</i></h3>
<code>public function addListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>boolean override</code>]</span>)</code>
<div class="mdetail-desc">
Appends an event handler to this element
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li><li><code>override</code> : boolean<div class="sub-desc">(optional) If true, scope becomes the scope</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="YAHOO.ext.util.Observable.html#addListener">Observable</a>.</div>
</div>
<a name="beginUpdate"></a>
<div class="mdetail alt">
<h3>beginUpdate</i></h3>
<code>public function beginUpdate()</code>
<div class="mdetail-desc">
Suspend the LayoutManager from doing auto-layouts while
making multiple add or remove calls
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by LayoutManager.</div>
</div>
<a name="delayedListener"></a>
<div class="mdetail">
<h3>delayedListener</i></h3>
<code>public function delayedListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Number delay</code>]</span>)</code>
<div class="mdetail-desc">
Appends an event handler to this element that is delayed the specified number of milliseconds.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li><li><code>delay</code> : Number<div class="sub-desc">(optional) The number of milliseconds to delay</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Function</code><div class="sub-desc">The wrapped function that was created (can be used to remove the listener)</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="YAHOO.ext.util.Observable.html#delayedListener">Observable</a>.</div>
</div>
<a name="endUpdate"></a>
<div class="mdetail alt">
<h3>endUpdate</i></h3>
<code>public function endUpdate(<code>Boolean noLayout</code>)</code>
<div class="mdetail-desc">
Restore auto-layouts and optionally disable the manager from performing a layout
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>noLayout</code> : Boolean<div class="sub-desc">true to disable a layout update</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by LayoutManager.</div>
</div>
<a name="fireEvent"></a>
<div class="mdetail">
<h3>fireEvent</i></h3>
<code>public function fireEvent(<code>String eventName</code>, <code>Object... args</code>)</code>
<div class="mdetail-desc">
Fires the specified event with the passed parameters (minus the event name).
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="YAHOO.ext.util.Observable.html#fireEvent">Observable</a>.</div>
</div>
<a name="getEl"></a>
<div class="mdetail alt">
<h3>getEl</i></h3>
<code>public function getEl()</code>
<div class="mdetail-desc">
Returns the element this layout is bound to.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>YAHOO.ext.Element</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by LayoutManager.</div>
</div>
<a name="getRegion"></a>
<div class="mdetail">
<h3>getRegion</i></h3>
<code>public function getRegion(<code>String target</code>)</code>
<div class="mdetail-desc">
Returns the specified region.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>target</code> : String<div class="sub-desc">The region key</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>YAHOO.ext.LayoutRegion</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by LayoutManager.</div>
</div>
<a name="getViewSize"></a>
<div class="mdetail alt">
<h3>getViewSize</i></h3>
<code>public function getViewSize()</code>
<div class="mdetail-desc">
Returns the size of the current view, This method normalizes document.body and element embedded layouts and
performs box-model adjustments.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The size as an object {width: (the width), height: (the height)}</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by LayoutManager.</div>
</div>
<a name="isUpdating"></a>
<div class="mdetail">
<h3>isUpdating</i></h3>
<code>public function isUpdating()</code>
<div class="mdetail-desc">
Returns true if this layout is currently being updated
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by LayoutManager.</div>
</div>
<a name="purgeListeners"></a>
<div class="mdetail alt">
<h3>purgeListeners</i></h3>
<code>public function purgeListeners()</code>
<div class="mdetail-desc">
Removes all listeners for this object
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="YAHOO.ext.util.Observable.html#purgeListeners">Observable</a>.</div>
</div>
<a name="removeListener"></a>
<div class="mdetail">
<h3>removeListener</i></h3>
<code>public function removeListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Removes a listener
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="YAHOO.ext.util.Observable.html#removeListener">Observable</a>.</div>
</div>
</div>
<h2 class="mdetail-head">Event Details</h2>
<div class="detail-wrap">
<a name="event-layout"></a>
<div class="mdetail">
<h3>layout</i></h3>
<code>public event layout</code>
<div class="mdetail-desc">
Fires when a layout is performed.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>this</code> : YAHOO.ext.LayoutManager<div class="sub-desc"></div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by LayoutManager.</div>
</div>
<a name="event-regioncollapsed"></a>
<div class="mdetail alt">
<h3>regioncollapsed</i></h3>
<code>public event regioncollapsed</code>
<div class="mdetail-desc">
Fires when a region is collapsed.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>region</code> : YAHOO.ext.LayoutRegion<div class="sub-desc"></div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by LayoutManager.</div>
</div>
<a name="event-regionexpanded"></a>
<div class="mdetail">
<h3>regionexpanded</i></h3>
<code>public event regionexpanded</code>
<div class="mdetail-desc">
Fires when a region is expanded.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>region</code> : YAHOO.ext.LayoutRegion<div class="sub-desc"></div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by LayoutManager.</div>
</div>
<a name="event-regionresized"></a>
<div class="mdetail alt">
<h3>regionresized</i></h3>
<code>public event regionresized</code>
<div class="mdetail-desc">
Fires when the user resizes a region.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>region</code> : YAHOO.ext.LayoutRegion<div class="sub-desc"></div></li><li><code>newSize</code> : Number<div class="sub-desc">The new size (width for east/west, height for north/south)</div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by LayoutManager.</div>
</div>
</div>
</div>
<hr>
Copyright &copy; 2006 Jack Slocum. All rights reserved.
</body>
</html>