205 lines
No EOL
11 KiB
HTML
205 lines
No EOL
11 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Ext.dd.Registry</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">
|
|
<!-- GC -->
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools">
|
|
<img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="Ext.dd.Registry.html" target="_blank">Print Friendly</a><br/>
|
|
|
|
</div>
|
|
<h1>Class Ext.dd.Registry</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>Ext.dd</td></tr>
|
|
<tr><td class="label">Class:</td><td>Registry</td></tr>
|
|
<tr><td class="label">Extends:</td><td>Object</td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="Registry.jss.html">Registry.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either
|
|
directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.<br><br><i>This class is a singleton and cannot be created directly.</i> </div>
|
|
<br />
|
|
<a href="#properties">Properties</a>
|
|
- <a href="#methods">Methods</a>
|
|
- <a href="#events">Events</a>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<div class="no-members">This class has no public properties.</div> <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" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getHandle">getHandle</a>(<code>String/HTMLElement id</code>) : Object</td>
|
|
<td class="msource" rowspan="2">Registry</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the handle registered for a DOM Node by id</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getHandleFromEvent">getHandleFromEvent</a>(<code>Event e</code>) : Object</td>
|
|
<td class="msource" rowspan="2">Registry</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns the handle that is registered for the DOM node that is the target of the event</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getTarget">getTarget</a>(<code>String/HTMLElement id</code>) : Object</td>
|
|
<td class="msource" rowspan="2">Registry</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns a custom data object that is registered for a DOM node by id</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getTargetFromEvent">getTargetFromEvent</a>(<code>Event e</code>) : Object</td>
|
|
<td class="msource" rowspan="2">Registry</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns a custom data object that is registered for the DOM node that is the target of the event</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#register">register</a>(<code>String/HTMLElement) element</code>, <span class="optional" title="Optional">[<code>Object data</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2">Registry</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Resgister a drag drop element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#unregister">unregister</a>(<code>String/HTMLElement) element</code>) : void</td>
|
|
<td class="msource" rowspan="2">Registry</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Unregister a drag drop element</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<div class="no-members">This class has no public events.</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="getHandle"></a>
|
|
<div class="mdetail">
|
|
<h3>getHandle</i></h3>
|
|
<code>public function getHandle(<code>String/HTMLElement id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns the handle registered for a DOM Node by id
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : String/HTMLElement<div class="sub-desc">The DOM node or id to look up</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">handle The custom handle data</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Registry.</div>
|
|
</div>
|
|
<a name="getHandleFromEvent"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getHandleFromEvent</i></h3>
|
|
<code>public function getHandleFromEvent(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns the handle that is registered for the DOM node that is the target of the event
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">The event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">handle The custom handle data</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Registry.</div>
|
|
</div>
|
|
<a name="getTarget"></a>
|
|
<div class="mdetail">
|
|
<h3>getTarget</i></h3>
|
|
<code>public function getTarget(<code>String/HTMLElement id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns a custom data object that is registered for a DOM node by id
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : String/HTMLElement<div class="sub-desc">The DOM node or id to look up</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">data The custom data</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Registry.</div>
|
|
</div>
|
|
<a name="getTargetFromEvent"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getTargetFromEvent</i></h3>
|
|
<code>public function getTargetFromEvent(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns a custom data object that is registered for the DOM node that is the target of the event
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">The event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">data The custom data</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Registry.</div>
|
|
</div>
|
|
<a name="register"></a>
|
|
<div class="mdetail">
|
|
<h3>register</i></h3>
|
|
<code>public function register(<code>String/HTMLElement) element</code>, <span class="optional" title="Optional">[<code>Object data</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Resgister a drag drop element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>element</code> : String/HTMLElement)<div class="sub-desc">The id or DOM node to register</div></li><li><code>data</code> : Object<div class="sub-desc">(optional) An custom data object that will be passed between the elements that are involved in drag drop operations. You can populate this object with any arbitrary properties that your own code knows how to interpret, plus there are some specific properties known to the Registry that should be populated in the data object (if applicable): <pre> Value Description<br /> --------- ------------------------------------------<br /> handles Array of DOM nodes that trigger dragging<br /> for the element being registered<br /> isHandle True if the element passed in triggers<br /> dragging itself, else false </pre></div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Registry.</div>
|
|
</div>
|
|
<a name="unregister"></a>
|
|
<div class="mdetail alt">
|
|
<h3>unregister</i></h3>
|
|
<code>public function unregister(<code>String/HTMLElement) element</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unregister a drag drop element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>element</code> : String/HTMLElement)<div class="sub-desc">The id or DOM node to unregister</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Registry.</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright © 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
|
|
|
|
</body>
|
|
</html> |