Package com.sencha.gxt.dnd.core.client
Class TreeGridDragSource<M>
- java.lang.Object
-
- com.sencha.gxt.dnd.core.client.DragSource
-
- 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
TreeGridto act as the source of a drag and drop operation.Use
setTreeGridSource(com.sencha.gxt.dnd.core.client.DND.TreeSource)to specify whether leaf nodes, non-leaf nodes or both types of nodes can be dragged (defaults toDND.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
Constructors Constructor Description TreeGridDragSource(TreeGrid<M> widget)Creates a drag source for the specified tree grid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DND.TreeSourcegetTreeGridSource()Returns the tree grid associated with this drag source.TreeGrid<M>getWidget()Returns the source widget.voidsetTreeGridSource(DND.TreeSource treeGridSource)Sets the tree source (defaults toDND.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
-
-
-
-
Method Detail
-
getTreeGridSource
public DND.TreeSource getTreeGridSource()
Returns the tree grid associated with this drag source.- Returns:
- the tree grid associated with this drag source
-
getWidget
public TreeGrid<M> getWidget()
Description copied from class:DragSourceReturns the source widget.- Overrides:
getWidgetin classDragSource- Returns:
- the widget
-
setTreeGridSource
public void setTreeGridSource(DND.TreeSource treeGridSource)
Sets the tree source (defaults toDND.TreeSource.BOTH).- Parameters:
treeGridSource- the tree source
-
-