Class TreeGridDragSource<M>

  extended by com.sencha.gxt.dnd.core.client.DragSource
      extended by com.sencha.gxt.dnd.core.client.TreeGridDragSource<M>
Type Parameters:
M - the model type
All Implemented Interfaces:
DndDragCancelEvent.HasDndDragCancelHandlers, DndDragStartEvent.HasDndDragStartHandlers, DndDropEvent.HasDndDropHandlers

public class TreeGridDragSource<M>
extends DragSource

Enables a TreeGrid to act as the source of a drag and drop operation.

Use #setTreeSource(TreeSource) to specify whether leaf nodes, non-leaf nodes or both types of nodes can be dragged (defaults to DND.TreeSource.BOTH). The drag operation is cancelled if the user attempts to drag a node type that is not permitted.

The drag data consists of a list of items of type <M>. It is optimized to remove children of parents that are also in the list (i.e. if a parent is the subject of a drag operation then all of its children are implicitly part of the drag operation).

Constructor Summary
TreeGridDragSource(TreeGrid<M> widget)
          Creates a drag source for the specified tree grid.
Method Summary
 DND.TreeSource getTreeGridSource()
          Returns the tree grid associated with this drag source.
 TreeGrid<M> getWidget()
          Returns the source widget.
 void setTreeGridSource(DND.TreeSource treeGridSource)
          Sets the tree source (defaults to DND.TreeSource.BOTH).
Methods inherited from class com.sencha.gxt.dnd.core.client.DragSource
addDragCancelHandler, addDragStartHandler, addDropHandler, disable, enable, getData, getDraggable, getGroup, getStatusText, isEnabled, release, setData, setGroup, setStatusText
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public TreeGridDragSource(TreeGrid<M> widget)
Creates a drag source for the specified tree grid.

widget - the tree grid to enable as a drag source
Method Detail


public DND.TreeSource getTreeGridSource()
Returns the tree grid associated with this drag source.

the tree grid associated with this drag source


public TreeGrid<M> getWidget()
Description copied from class: DragSource
Returns the source widget.

getWidget in class DragSource
the widget


public void setTreeGridSource(DND.TreeSource treeGridSource)
Sets the tree source (defaults to DND.TreeSource.BOTH).

treeGridSource - the tree source

Copyright © 2012. All Rights Reserved.