Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.tree.ViewDDPlugin.js
1 Ext.data.JsonP.Ext_tree_ViewDDPlugin({
2   "tagname": "class",
3   "name": "Ext.tree.ViewDDPlugin",
4   "doc": "<p>This plugin provides drag and/or drop functionality for a TreeView.</p>\n\n\n<p>It creates a specialized instance of <a href=\"#/api/Ext.dd.DragZone\" rel=\"Ext.dd.DragZone\" class=\"docClass\">DragZone</a> which knows how to drag out of a <a href=\"#/api/Ext.tree.View\" rel=\"Ext.tree.View\" class=\"docClass\">TreeView</a>\nand loads the data object which is passed to a cooperating <a href=\"#/api/Ext.dd.DragZone\" rel=\"Ext.dd.DragZone\" class=\"docClass\">DragZone</a>'s methods with the following properties:<ul>\n<li>copy : Boolean\n <div class=\"sub-desc\">The value of the TreeView's <code>copy</code> property, or <code>true</code> if the TreeView was configured\n with <code>allowCopy: true</code> <u>and</u> the control key was pressed when the drag operation was begun.</div></li>\n<li>view : TreeView\n <div class=\"sub-desc\">The source TreeView from which the drag originated.</div></li>\n<li>ddel : HtmlElement\n <div class=\"sub-desc\">The drag proxy element which moves with the mouse</div></li>\n<li>item : HtmlElement\n <div class=\"sub-desc\">The TreeView node upon which the mousedown event was registered.</div></li>\n<li>records : Array\n <div class=\"sub-desc\">An Array of <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Model</a>s representing the selected data being dragged from the source TreeView.</div></li>\n</ul></p>\n\n\n<p>It also creates a specialized instance of <a href=\"#/api/Ext.dd.DropZone\" rel=\"Ext.dd.DropZone\" class=\"docClass\">Ext.dd.DropZone</a> which cooperates with other DropZones which are members of the same\nddGroup which processes such data objects.</p>\n\n\n<p>Adding this plugin to a view means that two new events may be fired from the client TreeView, <code><a href=\"#/api/Ext.tree.ViewDDPlugin--event-beforedrop\" rel=\"Ext.tree.ViewDDPlugin--event-beforedrop\" class=\"docClass\">beforedrop</a></code> and\n<code><a href=\"#/api/Ext.tree.ViewDDPlugin--event-drop\" rel=\"Ext.tree.ViewDDPlugin--event-drop\" class=\"docClass\">drop</a></code></p>\n\n",
5   "extends": "Ext.AbstractPlugin",
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": null,
15   "singleton": false,
16   "private": false,
17   "cfg": [
18     {
19       "tagname": "cfg",
20       "name": "allowContainerDrop",
21       "member": "Ext.tree.ViewDDPlugin",
22       "type": "String",
23       "doc": "<p>True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)</p>\n",
24       "private": false,
25       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
26       "linenr": 100,
27       "html_filename": "TreeViewDragDrop.html",
28       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-allowContainerDrop"
29     },
30     {
31       "tagname": "cfg",
32       "name": "allowParentInsert",
33       "member": "Ext.tree.ViewDDPlugin",
34       "type": "Boolean",
35       "doc": "<p>Allow inserting a dragged node between an expanded parent node and its first child that will become a\nsibling of the parent when dropped (defaults to false)</p>\n",
36       "private": false,
37       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
38       "linenr": 93,
39       "html_filename": "TreeViewDragDrop.html",
40       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-allowParentInsert",
41       "shortDoc": "Allow inserting a dragged node between an expanded parent node and its first child that will become a\nsibling of the ..."
42     },
43     {
44       "tagname": "cfg",
45       "name": "appendOnly",
46       "member": "Ext.tree.ViewDDPlugin",
47       "type": "String",
48       "doc": "<p>True if the tree should only allow append drops (use for trees which are sorted, defaults to false)</p>\n",
49       "private": false,
50       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
51       "linenr": 106,
52       "html_filename": "TreeViewDragDrop.html",
53       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-appendOnly"
54     },
55     {
56       "tagname": "cfg",
57       "name": "ddGroup",
58       "member": "Ext.tree.ViewDDPlugin",
59       "type": "String",
60       "doc": "<p>A named drag drop group to which this object belongs.  If a group is specified, then both the DragZones and DropZone\nused by this plugin will only interact with other drag drop objects in the same group (defaults to 'TreeDD').</p>\n",
61       "private": false,
62       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
63       "linenr": 112,
64       "html_filename": "TreeViewDragDrop.html",
65       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-ddGroup",
66       "shortDoc": "A named drag drop group to which this object belongs.  If a group is specified, then both the DragZones and DropZone\n..."
67     },
68     {
69       "tagname": "cfg",
70       "name": "dragGroup",
71       "member": "Ext.tree.ViewDDPlugin",
72       "type": "String",
73       "doc": "<p>The ddGroup to which the DragZone will belong.</p>\n\n\n<p>This defines which other DropZones the DragZone will interact with. Drag/DropZones only interact with other Drag/DropZones\nwhich are members of the same ddGroup.</p>\n\n",
74       "private": false,
75       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
76       "linenr": 119,
77       "html_filename": "TreeViewDragDrop.html",
78       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-dragGroup",
79       "shortDoc": "The ddGroup to which the DragZone will belong.\n\n\nThis defines which other DropZones the DragZone will interact with. ..."
80     },
81     {
82       "tagname": "cfg",
83       "name": "dropGroup",
84       "member": "Ext.tree.ViewDDPlugin",
85       "type": "String",
86       "doc": "<p>The ddGroup to which the DropZone will belong.</p>\n\n\n<p>This defines which other DragZones the DropZone will interact with. Drag/DropZones only interact with other Drag/DropZones\nwhich are members of the same ddGroup.</p>\n\n",
87       "private": false,
88       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
89       "linenr": 126,
90       "html_filename": "TreeViewDragDrop.html",
91       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-dropGroup",
92       "shortDoc": "The ddGroup to which the DropZone will belong.\n\n\nThis defines which other DragZones the DropZone will interact with. ..."
93     },
94     {
95       "tagname": "cfg",
96       "name": "enableDrag",
97       "member": "Ext.tree.ViewDDPlugin",
98       "type": "Boolean",
99       "doc": "<p>Defaults to <code>true</code></p>\n\n\n<p>Set to <code>false</code> to disallow dragging items from the View </p>\n\n",
100       "private": false,
101       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
102       "linenr": 147,
103       "html_filename": "TreeViewDragDrop.html",
104       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-enableDrag"
105     },
106     {
107       "tagname": "cfg",
108       "name": "enableDrop",
109       "member": "Ext.tree.ViewDDPlugin",
110       "type": "Boolean",
111       "doc": "<p>Defaults to <code>true</code></p>\n\n\n<p>Set to <code>false</code> to disallow the View from accepting drop gestures</p>\n\n",
112       "private": false,
113       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
114       "linenr": 140,
115       "html_filename": "TreeViewDragDrop.html",
116       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-enableDrop"
117     },
118     {
119       "tagname": "cfg",
120       "name": "expandDelay",
121       "member": "Ext.tree.ViewDDPlugin",
122       "type": "String",
123       "doc": "<p>The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node\nover the target (defaults to 1000)</p>\n",
124       "private": false,
125       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
126       "linenr": 133,
127       "html_filename": "TreeViewDragDrop.html",
128       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-expandDelay",
129       "shortDoc": "The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node\nover the target..."
130     },
131     {
132       "tagname": "cfg",
133       "name": "nodeHighlightColor",
134       "member": "Ext.tree.ViewDDPlugin",
135       "type": "String",
136       "doc": "<p>The color to use when visually highlighting the dragged\nor dropped node (defaults to 'c3daf9' - light blue). The color must be a 6 digit hex value, without\na preceding '#'. See also <a href=\"#/api/Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnDrop\" rel=\"Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnDrop\" class=\"docClass\">nodeHighlightOnDrop</a> and <a href=\"#/api/Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnRepair\" rel=\"Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnRepair\" class=\"docClass\">nodeHighlightOnRepair</a>.</p>\n",
137       "private": false,
138       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
139       "linenr": 154,
140       "html_filename": "TreeViewDragDrop.html",
141       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-nodeHighlightColor",
142       "shortDoc": "The color to use when visually highlighting the dragged\nor dropped node (defaults to 'c3daf9' - light blue). The colo..."
143     },
144     {
145       "tagname": "cfg",
146       "name": "nodeHighlightOnDrop",
147       "member": "Ext.tree.ViewDDPlugin",
148       "type": "Boolean",
149       "doc": "<p>Whether or not to highlight any nodes after they are\nsuccessfully dropped on their target. Defaults to the value of <code>Ext.enableFx</code>.\nSee also <a href=\"#/api/Ext.tree.ViewDDPlugin-cfg-nodeHighlightColor\" rel=\"Ext.tree.ViewDDPlugin-cfg-nodeHighlightColor\" class=\"docClass\">nodeHighlightColor</a> and <a href=\"#/api/Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnRepair\" rel=\"Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnRepair\" class=\"docClass\">nodeHighlightOnRepair</a>.</p>\n",
150       "private": false,
151       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
152       "linenr": 161,
153       "html_filename": "TreeViewDragDrop.html",
154       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-nodeHighlightOnDrop",
155       "shortDoc": "Whether or not to highlight any nodes after they are\nsuccessfully dropped on their target. Defaults to the value of E..."
156     },
157     {
158       "tagname": "cfg",
159       "name": "nodeHighlightOnRepair",
160       "member": "Ext.tree.ViewDDPlugin",
161       "type": "Boolean",
162       "doc": "<p>Whether or not to highlight any nodes after they are\nrepaired from an unsuccessful drag/drop. Defaults to the value of <code>Ext.enableFx</code>.\nSee also <a href=\"#/api/Ext.tree.ViewDDPlugin-cfg-nodeHighlightColor\" rel=\"Ext.tree.ViewDDPlugin-cfg-nodeHighlightColor\" class=\"docClass\">nodeHighlightColor</a> and <a href=\"#/api/Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnDrop\" rel=\"Ext.tree.ViewDDPlugin-cfg-nodeHighlightOnDrop\" class=\"docClass\">nodeHighlightOnDrop</a>.</p>\n",
163       "private": false,
164       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
165       "linenr": 169,
166       "html_filename": "TreeViewDragDrop.html",
167       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-cfg-nodeHighlightOnRepair",
168       "shortDoc": "Whether or not to highlight any nodes after they are\nrepaired from an unsuccessful drag/drop. Defaults to the value o..."
169     }
170   ],
171   "method": [
172     {
173       "tagname": "method",
174       "name": "destroy",
175       "member": "Ext.AbstractPlugin",
176       "doc": "<p>The destroy method is invoked by the owning Component at the time the Component is being destroyed.\nUse this method to clean up an resources.</p>\n",
177       "params": [
178
179       ],
180       "return": {
181         "type": "void",
182         "doc": "\n"
183       },
184       "private": false,
185       "static": false,
186       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/AbstractPlugin.js",
187       "linenr": 30,
188       "html_filename": "AbstractPlugin.html",
189       "href": "AbstractPlugin.html#Ext-AbstractPlugin-method-destroy",
190       "shortDoc": "The destroy method is invoked by the owning Component at the time the Component is being destroyed.\nUse this method t..."
191     },
192     {
193       "tagname": "method",
194       "name": "disable",
195       "member": "Ext.AbstractPlugin",
196       "doc": "<p>Disable the plugin and set the disabled flag to true.</p>\n",
197       "params": [
198
199       ],
200       "return": {
201         "type": "void",
202         "doc": "\n"
203       },
204       "private": false,
205       "static": false,
206       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/AbstractPlugin.js",
207       "linenr": 44,
208       "html_filename": "AbstractPlugin.html",
209       "href": "AbstractPlugin.html#Ext-AbstractPlugin-method-disable",
210       "shortDoc": "<p>Disable the plugin and set the disabled flag to true.</p>\n"
211     },
212     {
213       "tagname": "method",
214       "name": "enable",
215       "member": "Ext.AbstractPlugin",
216       "doc": "<p>Enable the plugin and set the disabled flag to false.</p>\n",
217       "params": [
218
219       ],
220       "return": {
221         "type": "void",
222         "doc": "\n"
223       },
224       "private": false,
225       "static": false,
226       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/AbstractPlugin.js",
227       "linenr": 37,
228       "html_filename": "AbstractPlugin.html",
229       "href": "AbstractPlugin.html#Ext-AbstractPlugin-method-enable",
230       "shortDoc": "<p>Enable the plugin and set the disabled flag to false.</p>\n"
231     },
232     {
233       "tagname": "method",
234       "name": "init",
235       "member": "Ext.AbstractPlugin",
236       "doc": "<p>The init method is invoked after initComponent has been run for the\ncomponent which we are injecting the plugin into.</p>\n",
237       "params": [
238
239       ],
240       "return": {
241         "type": "void",
242         "doc": "\n"
243       },
244       "private": false,
245       "static": false,
246       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/AbstractPlugin.js",
247       "linenr": 23,
248       "html_filename": "AbstractPlugin.html",
249       "href": "AbstractPlugin.html#Ext-AbstractPlugin-method-init",
250       "shortDoc": "<p>The init method is invoked after initComponent has been run for the\ncomponent which we are injecting the plugin into.</p>\n"
251     }
252   ],
253   "property": [
254
255   ],
256   "event": [
257     {
258       "tagname": "event",
259       "name": "beforedrop",
260       "member": "Ext.tree.ViewDDPlugin",
261       "doc": "<p><b>This event is fired through the TreeView. Add listeners to the TreeView object</b></p>\n\n\n<p>Fired when a drop gesture has been triggered by a mouseup event in a valid drop position in the TreeView.\n\n",
262       "params": [
263         {
264           "type": "HtmlElement",
265           "name": "node",
266           "doc": "<p>The TreeView node <b>if any</b> over which the mouse was positioned.</p></p>\n\n<p>Returning <code>false</code> to this event signals that the drop gesture was invalid, and if the drag proxy\nwill animate back to the point from which the drag began.</p>\n\n\n<p>Returning <code>0</code> To this event signals that the data transfer operation should not take place, but\nthat the gesture was valid, and that the repair operation should not take place.</p>\n\n\n<p>Any other return value continues with the data transfer operation.</p>\n\n",
267           "optional": false
268         },
269         {
270           "type": "Object",
271           "name": "data",
272           "doc": "<p>The data object gathered at mousedown time by the cooperating <a href=\"#/api/Ext.dd.DragZone\" rel=\"Ext.dd.DragZone\" class=\"docClass\">DragZone</a>'s\n<a href=\"#/api/Ext.dd.DragZone-method-getDragData\" rel=\"Ext.dd.DragZone-method-getDragData\" class=\"docClass\">getDragData</a> method it contains the following properties:<ul>\n<li>copy : Boolean\n <div class=\"sub-desc\">The value of the TreeView's <code>copy</code> property, or <code>true</code> if the TreeView was configured\n with <code>allowCopy: true</code> and the control key was pressed when the drag operation was begun</div></li>\n<li>view : TreeView\n <div class=\"sub-desc\">The source TreeView from which the drag originated.</div></li>\n<li>ddel : HtmlElement\n <div class=\"sub-desc\">The drag proxy element which moves with the mouse</div></li>\n<li>item : HtmlElement\n <div class=\"sub-desc\">The TreeView node upon which the mousedown event was registered.</div></li>\n<li>records : Array\n <div class=\"sub-desc\">An Array of <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Model</a>s representing the selected data being dragged from the source TreeView.</div></li>\n</ul></p>\n",
273           "optional": false
274         },
275         {
276           "type": "Ext.data.Model",
277           "name": "overModel",
278           "doc": "<p>The Model over which the drop gesture took place.</p>\n",
279           "optional": false
280         },
281         {
282           "type": "String",
283           "name": "dropPosition",
284           "doc": "<p><code>\"before\"</code>, <code>\"after\"</code> or <code>\"append\"</code> depending on whether the mouse is above or below the midline of the node,\nor the node is a branch node which accepts new child nodes.</p>\n",
285           "optional": false
286         },
287         {
288           "type": "Function",
289           "name": "dropFunction",
290           "doc": "<p>A function to call to complete the data transfer operation and either move or copy Model instances from the source\nView's Store to the destination View's Store.</p>\n\n\n<p>This is useful when you want to perform some kind of asynchronous processing before confirming\nthe drop, such as an <a href=\"#/api/Ext.window.MessageBox-method-confirm\" rel=\"Ext.window.MessageBox-method-confirm\" class=\"docClass\">confirm</a> call, or an Ajax request.</p>\n\n\n<p>Return <code>0</code> from this event handler, and call the <code>dropFunction</code> at any time to perform the data transfer.</p>\n\n",
291           "optional": false
292         }
293       ],
294       "private": false,
295       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
296       "linenr": 33,
297       "html_filename": "TreeViewDragDrop.html",
298       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-event-beforedrop",
299       "shortDoc": "This event is fired through the TreeView. Add listeners to the TreeView object\n\n\nFired when a drop gesture has been t..."
300     },
301     {
302       "tagname": "event",
303       "name": "drop",
304       "member": "Ext.tree.ViewDDPlugin",
305       "doc": "<p><b>This event is fired through the TreeView. Add listeners to the TreeView object</b>\nFired when a drop operation has been completed and the data has been moved or copied.</p>\n",
306       "params": [
307         {
308           "type": "HtmlElement",
309           "name": "node",
310           "doc": "<p>The TreeView node <b>if any</b> over which the mouse was positioned.</p>\n",
311           "optional": false
312         },
313         {
314           "type": "Object",
315           "name": "data",
316           "doc": "<p>The data object gathered at mousedown time by the cooperating <a href=\"#/api/Ext.dd.DragZone\" rel=\"Ext.dd.DragZone\" class=\"docClass\">DragZone</a>'s\n<a href=\"#/api/Ext.dd.DragZone-method-getDragData\" rel=\"Ext.dd.DragZone-method-getDragData\" class=\"docClass\">getDragData</a> method it contains the following properties:<ul>\n<li>copy : Boolean\n <div class=\"sub-desc\">The value of the TreeView's <code>copy</code> property, or <code>true</code> if the TreeView was configured\n with <code>allowCopy: true</code> and the control key was pressed when the drag operation was begun</div></li>\n<li>view : TreeView\n <div class=\"sub-desc\">The source TreeView from which the drag originated.</div></li>\n<li>ddel : HtmlElement\n <div class=\"sub-desc\">The drag proxy element which moves with the mouse</div></li>\n<li>item : HtmlElement\n <div class=\"sub-desc\">The TreeView node upon which the mousedown event was registered.</div></li>\n<li>records : Array\n <div class=\"sub-desc\">An Array of <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Model</a>s representing the selected data being dragged from the source TreeView.</div></li>\n</ul></p>\n",
317           "optional": false
318         },
319         {
320           "type": "Ext.data.Model",
321           "name": "overModel",
322           "doc": "<p>The Model over which the drop gesture took place.</p>\n",
323           "optional": false
324         },
325         {
326           "type": "String",
327           "name": "dropPosition",
328           "doc": "<p><code>\"before\"</code>, <code>\"after\"</code> or <code>\"append\"</code> depending on whether the mouse is above or below the midline of the node,\nor the node is a branch node which accepts new child nodes.</p>\n",
329           "optional": false
330         }
331       ],
332       "private": false,
333       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
334       "linenr": 67,
335       "html_filename": "TreeViewDragDrop.html",
336       "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin-event-drop",
337       "shortDoc": "This event is fired through the TreeView. Add listeners to the TreeView object\nFired when a drop operation has been c..."
338     }
339   ],
340   "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/tree/plugin/TreeViewDragDrop.js",
341   "linenr": 1,
342   "html_filename": "TreeViewDragDrop.html",
343   "href": "TreeViewDragDrop.html#Ext-tree-ViewDDPlugin",
344   "cssVar": [
345
346   ],
347   "cssMixin": [
348
349   ],
350   "component": false,
351   "superclasses": [
352     "Ext.AbstractPlugin"
353   ],
354   "subclasses": [
355
356   ],
357   "mixedInto": [
358
359   ],
360   "allMixins": [
361
362   ]
363 });