01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08: package com.gwtext.client.widgets.tree;
09:
10: import com.google.gwt.core.client.JavaScriptObject;
11: import com.gwtext.client.dd.DragData;
12:
13: /**
14: * An implementation of DragData that is passed to the drop target when the source is a TreeNode from a Draggable tree.
15: *
16: * @see com.gwtext.client.widgets.tree.event.TreePanelListener#doBeforeNodeDrop(TreePanel, TreeNode, com.gwtext.client.dd.DragData, String, com.gwtext.client.dd.DragDrop, TreeNode, DropNodeCallback)
17: * @see com.gwtext.client.widgets.tree.event.TreePanelListener#onNodeDrop(TreePanel, TreeNode, com.gwtext.client.dd.DragData, String, com.gwtext.client.dd.DragDrop, TreeNode)
18: */
19: public class TreeDragData extends DragData {
20:
21: public TreeDragData(JavaScriptObject jsObj) {
22: super (jsObj);
23: }
24:
25: /**
26: * Return the dropped TreeNode.
27: *
28: * @return the dropped TreeNode
29: */
30: public TreeNode getTreeNode() {
31: JavaScriptObject treeNode = getPropertyAsJavaScriptObject("node");
32: return new TreeNode(treeNode);
33: }
34: }
|