com.extjs.gxt.ui.client.dnd
Class ListViewDragSource

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.dnd.DragSource
          extended by com.extjs.gxt.ui.client.dnd.ListViewDragSource
All Implemented Interfaces:
Observable

public class ListViewDragSource
extends DragSource

A DragSource implementation for ListViews. Supports both single and multi-selections. The selected model instances will be set as the data to be dragged.


Field Summary
protected  ListView<ModelData> listView
           
 
Fields inherited from class com.extjs.gxt.ui.client.dnd.DragSource
component, data, draggable, listener, statusProxy
 
Constructor Summary
ListViewDragSource(ListView listView)
          Creates a new list view drag source instance.
 
Method Summary
 ListView<ModelData> getListView()
          Returns the sources list view.
protected  void onDragDrop(DNDEvent e)
           
protected  void onDragStart(DNDEvent e)
          Called when a drag operation begins on the target component.
 
Methods inherited from class com.extjs.gxt.ui.client.dnd.DragSource
addDNDListener, disable, enable, getComponent, getData, getDraggable, getGroup, getStatusText, isEnabled, onDragCancelled, onDragFail, release, removeDNDListener, setData, setGroup, setStatusText
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listView

protected ListView<ModelData> listView
Constructor Detail

ListViewDragSource

public ListViewDragSource(ListView listView)
Creates a new list view drag source instance.

Parameters:
listView - the source list view
Method Detail

getListView

public ListView<ModelData> getListView()
Returns the sources list view.

Returns:
the list view

onDragDrop

protected void onDragDrop(DNDEvent e)
Overrides:
onDragDrop in class DragSource

onDragStart

protected void onDragStart(DNDEvent e)
Description copied from class: DragSource
Called when a drag operation begins on the target component. Subclasses or any listeners can cancel the action by calling BaseEvent.setCancelled(boolean).

Overrides:
onDragStart in class DragSource
Parameters:
e - the dnd event