com.extjs.gxt.ui.client.dnd
Class TreePanelDragSource
java.lang.Object
com.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.dnd.DragSource
com.extjs.gxt.ui.client.dnd.TreePanelDragSource
- All Implemented Interfaces:
- Observable
public class TreePanelDragSource
- extends DragSource
DragSource
implementation for TreePanel.
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 |
tree
protected TreePanel<ModelData> tree
treeSource
protected DND.TreeSource treeSource
treeStoreState
protected boolean treeStoreState
TreePanelDragSource
public TreePanelDragSource(TreePanel tree)
getTreeSource
public DND.TreeSource getTreeSource()
- Returns the type of items that can be dragged.
- Returns:
- the tree source type
isTreeStoreState
public boolean isTreeStoreState()
- Returns true if tree store state is enabled.
- Returns:
- the tree store state
setTreeSource
public void setTreeSource(DND.TreeSource treeSource)
- Sets which tree items can be dragged (defaults to BOTH).
- Parameters:
treeSource
- the tree source type
setTreeStoreState
public void setTreeStoreState(boolean treeStoreState)
- True to use
TreeStore.getModelState(ModelData)
when setting the
drag data (defaults to true). False to return a flat list of the selected
models in the tree.
- Parameters:
treeStoreState
- true to use model state
onDragDrop
protected void onDragDrop(DNDEvent event)
- 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