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.dd.DragSource</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.dd.DragSource-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.dd.DragSource-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.dd.DragSource-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.dd.DragSource-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.dd.DDProxy.html#constructor" roo:cls="Roo.dd.DDProxy.html#constructor">Roo.dd.DDProxy</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.dd.DragSource
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
57 Class Roo.dd.DragSource
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo.dd</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_dd_DragSource.js.html">Roo/dd/DragSource.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">DragSource</td></tr>
74 <tr><td class="label">Extends:</td><td class="hd-info">
75 <a href="./Roo.dd.DDProxy.html#constructor" roo:cls="Roo.dd.DDProxy.html#constructor">Roo.dd.DDProxy</a>
83 <!-- ============================== class summary ========================== -->
84 <div class="description">
85 A simple class that provides the basic implementation needed to make any element draggable.
89 <!-- ============================== Class comment block... ========================== -->
91 <div class="comments">
92 <b>Class Comments / Notes</B> =>
93 <u onclick="parent.CommentDialog.showCommentId = 'Roo.dd.DragSource';">[Add Your comment/notes about this class]</u>
95 <iframe frameborder="0" id="comments-Roo.dd" style="border: none;width:100%;"
96 src="/blog.php/GtkDjsComments/Roo.dd.DragSource.html"></iframe>
101 <!-- ============================== config options ========================== -->
106 <div class="hr"></div>
107 <a id="Roo.dd.DragSource-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.dd.DragSource-cfg-dropAllowed" name=".dropAllowed"></a>
132 <div class="fixedFont">
133 <b class="itemname">dropAllowed</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
139 <div class="short">The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").</div>
143 <div class="long">The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").</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.dd.DragSource-cfg-dropNotAllowed" name=".dropNotAllowed"></a>
162 <div class="fixedFont">
163 <b class="itemname">dropNotAllowed</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
169 <div class="short">The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").</div>
173 <div class="long">The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").</div>
197 <!-- ============================== public properties ==================== -->
201 <a id="Roo.dd.DragSource-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.dd.DragSource-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.dd-method-DragSource" name=".DragSource"></a>
252 <div class="fixedFont">
253 <span class="attributes">new <B>Roo.dd.</B></span><b class="itemname">DragSource</b>
255 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
263 <div class="short">Create a new Roo.dd.DragSource</div>
270 Create a new Roo.dd.DragSource
273 <dl class="detailList">
274 <dt class="heading">Parameters:</dt>
277 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element</span> <b>el</b>
280 <dd>The container element</dd>
283 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>config</b>
310 <tr class="method-row config-row-alt1 expandable notInherited">
311 <td class="micon"><a class="exi" href="#expand"> </a></td>
315 <a id="Roo.dd.DragSource-method-beforeDragDrop" name=".beforeDragDrop"></a>
316 <div class="fixedFont">
317 <span class="attributes"></span><b class="itemname">beforeDragDrop</b>
319 (<a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a> <B><i>target</i></B>, Event <B><i>e</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
325 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
334 <div class="short">An empty function by default, but provided so that you can perform a custom action before the dragged<br/>item is dropped onto the target and optionally cancel the onDragDrop.</div>
340 An empty function by default, but provided so that you can perform a custom action before the dragged<br/>item is dropped onto the target and optionally cancel the onDragDrop.
347 <dl class="detailList">
348 <dt class="heading">Parameters:</dt>
351 <span class="fixedFont"><a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a></span> <b>target</b>
354 <dd>The drop target</dd>
357 <span class="fixedFont">Event</span> <b>e</b>
360 <dd>The event object</dd>
363 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
366 <dd>The id of the dragged element</dd>
374 <dl class="detailList">
375 <dt class="heading">Returns:</dt>
377 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> isValid True if the drag drop event is valid, else false to cancel</dd>
399 <tr class="method-row config-row-alt0 expandable notInherited">
400 <td class="micon"><a class="exi" href="#expand"> </a></td>
404 <a id="Roo.dd.DragSource-method-beforeDragEnter" name=".beforeDragEnter"></a>
405 <div class="fixedFont">
406 <span class="attributes"></span><b class="itemname">beforeDragEnter</b>
408 (<a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a> <B><i>target</i></B>, Event <B><i>e</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
414 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
423 <div class="short">An empty function by default, but provided so that you can perform a custom action<br/>before the dragged item enters the drop target and optionally cancel the onDragEnter.</div>
429 An empty function by default, but provided so that you can perform a custom action<br/>before the dragged item enters the drop target and optionally cancel the onDragEnter.
436 <dl class="detailList">
437 <dt class="heading">Parameters:</dt>
440 <span class="fixedFont"><a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a></span> <b>target</b>
443 <dd>The drop target</dd>
446 <span class="fixedFont">Event</span> <b>e</b>
449 <dd>The event object</dd>
452 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
455 <dd>The id of the dragged element</dd>
463 <dl class="detailList">
464 <dt class="heading">Returns:</dt>
466 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> isValid True if the drag event is valid, else false to cancel</dd>
488 <tr class="method-row config-row-alt1 expandable notInherited">
489 <td class="micon"><a class="exi" href="#expand"> </a></td>
493 <a id="Roo.dd.DragSource-method-beforeDragOut" name=".beforeDragOut"></a>
494 <div class="fixedFont">
495 <span class="attributes"></span><b class="itemname">beforeDragOut</b>
497 (<a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a> <B><i>target</i></B>, Event <B><i>e</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
503 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
512 <div class="short">An empty function by default, but provided so that you can perform a custom action before the dragged<br/>item is dragged out of the target without dropping, and optionally cancel the onDragOut.</div>
518 An empty function by default, but provided so that you can perform a custom action before the dragged<br/>item is dragged out of the target without dropping, and optionally cancel the onDragOut.
525 <dl class="detailList">
526 <dt class="heading">Parameters:</dt>
529 <span class="fixedFont"><a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a></span> <b>target</b>
532 <dd>The drop target</dd>
535 <span class="fixedFont">Event</span> <b>e</b>
538 <dd>The event object</dd>
541 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
544 <dd>The id of the dragged element</dd>
552 <dl class="detailList">
553 <dt class="heading">Returns:</dt>
555 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> isValid True if the drag event is valid, else false to cancel</dd>
577 <tr class="method-row config-row-alt0 expandable notInherited">
578 <td class="micon"><a class="exi" href="#expand"> </a></td>
582 <a id="Roo.dd.DragSource-method-beforeDragOver" name=".beforeDragOver"></a>
583 <div class="fixedFont">
584 <span class="attributes"></span><b class="itemname">beforeDragOver</b>
586 (<a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a> <B><i>target</i></B>, Event <B><i>e</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
592 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
601 <div class="short">An empty function by default, but provided so that you can perform a custom action<br/>while the dragged item is over the drop target and optionally cancel the onDragOver.</div>
607 An empty function by default, but provided so that you can perform a custom action<br/>while the dragged item is over the drop target and optionally cancel the onDragOver.
614 <dl class="detailList">
615 <dt class="heading">Parameters:</dt>
618 <span class="fixedFont"><a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a></span> <b>target</b>
621 <dd>The drop target</dd>
624 <span class="fixedFont">Event</span> <b>e</b>
627 <dd>The event object</dd>
630 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
633 <dd>The id of the dragged element</dd>
641 <dl class="detailList">
642 <dt class="heading">Returns:</dt>
644 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> isValid True if the drag event is valid, else false to cancel</dd>
666 <tr class="method-row config-row-alt1 expandable notInherited">
667 <td class="micon"><a class="exi" href="#expand"> </a></td>
671 <a id="Roo.dd.DragSource-method-beforeInvalidDrop" name=".beforeInvalidDrop"></a>
672 <div class="fixedFont">
673 <span class="attributes"></span><b class="itemname">beforeInvalidDrop</b>
675 (<a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a> <B><i>target</i></B>, Event <B><i>e</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
681 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
690 <div class="short">An empty function by default, but provided so that you can perform a custom action after an invalid<br/>drop has occurred.</div>
696 An empty function by default, but provided so that you can perform a custom action after an invalid<br/>drop has occurred.
703 <dl class="detailList">
704 <dt class="heading">Parameters:</dt>
707 <span class="fixedFont"><a href="./Roo.dd.DragDrop.html#constructor" roo:cls="Roo.dd.DragDrop.html#constructor">Roo.dd.DragDrop</a></span> <b>target</b>
710 <dd>The drop target</dd>
713 <span class="fixedFont">Event</span> <b>e</b>
716 <dd>The event object</dd>
719 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
722 <dd>The id of the dragged element</dd>
730 <dl class="detailList">
731 <dt class="heading">Returns:</dt>
733 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> isValid True if the invalid drop should proceed, else false to cancel</dd>
755 <tr class="method-row config-row-alt0 expandable notInherited">
756 <td class="micon"><a class="exi" href="#expand"> </a></td>
760 <a id="Roo.dd.DragSource-method-getDragData" name=".getDragData"></a>
761 <div class="fixedFont">
762 <span class="attributes"></span><b class="itemname">getDragData</b>
770 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
779 <div class="short">Returns the data object associated with this drag source</div>
785 Returns the data object associated with this drag source
796 <dl class="detailList">
797 <dt class="heading">Returns:</dt>
799 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> data An object containing arbitrary data</dd>
821 <tr class="method-row config-row-alt1 expandable notInherited">
822 <td class="micon"><a class="exi" href="#expand"> </a></td>
826 <a id="Roo.dd.DragSource-method-getProxy" name=".getProxy"></a>
827 <div class="fixedFont">
828 <span class="attributes"></span><b class="itemname">getProxy</b>
836 <a href="./Roo.dd.StatusProxy.html#constructor" roo:cls="Roo.dd.StatusProxy.html#constructor">Roo.dd.StatusProxy</a>
845 <div class="short">Returns the drag source's underlying {<b>link</b> Roo.dd.StatusProxy}</div>
851 Returns the drag source's underlying {<b>link</b> Roo.dd.StatusProxy}
862 <dl class="detailList">
863 <dt class="heading">Returns:</dt>
865 <dd><span class="fixedFont"><a href="./Roo.dd.StatusProxy.html#constructor" roo:cls="Roo.dd.StatusProxy.html#constructor">Roo.dd.StatusProxy</a></span> proxy The StatusProxy</dd>
887 <tr class="method-row config-row-alt0 expandable notInherited">
888 <td class="micon"><a class="exi" href="#expand"> </a></td>
892 <a id="Roo.dd.DragSource-method-hideProxy" name=".hideProxy"></a>
893 <div class="fixedFont">
894 <span class="attributes"></span><b class="itemname">hideProxy</b>
903 <div class="short">Hides the drag source's {<b>link</b> Roo.dd.StatusProxy}</div>
909 Hides the drag source's {<b>link</b> Roo.dd.StatusProxy}
938 <tr class="method-row config-row-alt1 expandable notInherited">
939 <td class="micon"><a class="exi" href="#expand"> </a></td>
943 <a id="Roo.dd.DragSource-method-onBeforeDrag" name=".onBeforeDrag"></a>
944 <div class="fixedFont">
945 <span class="attributes"></span><b class="itemname">onBeforeDrag</b>
947 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>data</i></B>, Event <B><i>e</i></B>)
953 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
962 <div class="short">An empty function by default, but provided so that you can perform a custom action before the initial<br/>drag event begins and optionally cancel it.</div>
968 An empty function by default, but provided so that you can perform a custom action before the initial<br/>drag event begins and optionally cancel it.
975 <dl class="detailList">
976 <dt class="heading">Parameters:</dt>
979 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>data</b>
982 <dd>An object containing arbitrary data to be shared with drop targets</dd>
985 <span class="fixedFont">Event</span> <b>e</b>
988 <dd>The event object</dd>
996 <dl class="detailList">
997 <dt class="heading">Returns:</dt>
999 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> isValid True if the drag event is valid, else false to cancel</dd>
1013 <td class="msource">
1021 <tr class="method-row config-row-alt0 expandable notInherited">
1022 <td class="micon"><a class="exi" href="#expand"> </a></td>
1026 <a id="Roo.dd.DragSource-method-onStartDrag" name=".onStartDrag"></a>
1027 <div class="fixedFont">
1028 <span class="attributes"></span><b class="itemname">onStartDrag</b>
1030 (<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>)
1037 <div class="short">An empty function by default, but provided so that you can perform a custom action once the initial<br/>drag event has begun.</div>
1043 An empty function by default, but provided so that you can perform a custom action once the initial<br/>drag event has begun. The drag cannot be canceled from this function.
1050 <dl class="detailList">
1051 <dt class="heading">Parameters:</dt>
1054 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>x</b>
1057 <dd>The x position of the click on the dragged object</dd>
1060 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>y</b>
1063 <dd>The y position of the click on the dragged object</dd>
1081 <td class="msource">
1092 <!-- ============================== events summary / details ======================== -->
1095 <a id="Roo.dd.DragSource-events"></a>
1101 <table cellspacing="0" class="member-table">
1102 <caption class="Empty">Events - Has None</caption>
1113 <!-- ============================== footer ================================= -->
1114 <div class="fineprint" style="clear:both">
1116 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 16 2010 16:11:53 GMT+0800 (HKT)
1118 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>