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

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

Deprecated. TreePanelDropTarget

public class TreeDropTarget
extends DropTarget

A DropTarget implementation for Trees.

The implementation of onDragDrop expects either a list of TreeItems when using only a Tree, or a list of TreeModel instances if using a TreeBinder.


Field Summary
protected  TreeItem activeItem
          Deprecated.  
protected  TreeItem appendItem
          Deprecated.  
protected  TreeBinder<ModelData> binder
          Deprecated.  
protected  int status
          Deprecated.  
protected  Tree tree
          Deprecated.  
 
Fields inherited from class com.extjs.gxt.ui.client.dnd.DropTarget
component, feedback, operation, overStyle
 
Constructor Summary
TreeDropTarget(Tree tree)
          Deprecated. Creates a new tree drop target.
TreeDropTarget(TreeBinder<ModelData> binder)
          Deprecated. Creates a new tree drop target.
 
Method Summary
protected  void appendModel(ModelData p, TreeModel model, int index)
          Deprecated.  
protected  void clearStyles(DNDEvent event)
          Deprecated.  
 int getAutoExpandDelay()
          Deprecated. Returns the auto expand delay in milliseconds.
 TreeBinder<ModelData> getBinder()
          Deprecated. Returns the target's tree binder.
 Tree getTree()
          Deprecated. Returns the target's tree.
protected  void handleAppend(DNDEvent event, TreeItem item)
          Deprecated.  
protected  void handleAppendDrop(DNDEvent event, TreeItem item)
          Deprecated.  
protected  void handleInsert(DNDEvent event, TreeItem item)
          Deprecated.  
protected  void handleInsertDrop(DNDEvent event, TreeItem item, int index)
          Deprecated.  
 boolean isAllowDropOnLeaf()
          Deprecated. Returns whether drops are allowed on leaf nodes.
 boolean isAutoExpand()
          Deprecated. Returns true if auto expand is enabled.
protected  void onDragDrop(DNDEvent event)
          Deprecated. Called when the user releases the mouse over the target component.
protected  void onDragEnter(DNDEvent e)
          Deprecated. Called when the cursor first enters the bounds of the drop target.
protected  void onDragLeave(DNDEvent e)
          Deprecated. Called when the cursor leaves the target.
protected  void onDragMove(DNDEvent event)
          Deprecated. Called when the cursor is moved within the target component.
 void setAllowDropOnLeaf(boolean allowDropOnLeaf)
          Deprecated. True to allow drops on leaf nodes (defaults to false).
 void setAutoExpand(boolean autoExpand)
          Deprecated. True to automatically expand the active tree item when the user hovers over a collapsed item (defaults to true).
 void setAutoExpandDelay(int autoExpandDelay)
          Deprecated. Sets the delay used to auto expand items (defualts to 800).
protected  void showFeedback(DNDEvent event)
          Deprecated. Called as the mouse is moved over the target component.
 
Methods inherited from class com.extjs.gxt.ui.client.dnd.DropTarget
addDNDListener, disable, enable, getComponent, getFeedback, getGroup, getOperation, getOverStyle, isAllowSelfAsSource, isEnabled, onComponentAttach, onComponentDetach, onDragCancelled, onDragFail, prepareDropData, release, removeDNDListener, setAllowSelfAsSource, setFeedback, setGroup, setOperation, setOverStyle
 
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

binder

protected TreeBinder<ModelData> binder
Deprecated. 

tree

protected Tree tree
Deprecated. 

activeItem

protected TreeItem activeItem
Deprecated. 

appendItem

protected TreeItem appendItem
Deprecated. 

status

protected int status
Deprecated. 
Constructor Detail

TreeDropTarget

public TreeDropTarget(Tree tree)
Deprecated. 
Creates a new tree drop target.

Parameters:
tree - the target tree

TreeDropTarget

public TreeDropTarget(TreeBinder<ModelData> binder)
Deprecated. 
Creates a new tree drop target.

Parameters:
binder - the target tree binder
Method Detail

getAutoExpandDelay

public int getAutoExpandDelay()
Deprecated. 
Returns the auto expand delay in milliseconds.

Returns:
the delay

getBinder

public TreeBinder<ModelData> getBinder()
Deprecated. 
Returns the target's tree binder.

Returns:
the tree binder

getTree

public Tree getTree()
Deprecated. 
Returns the target's tree.

Returns:
the tree

isAllowDropOnLeaf

public boolean isAllowDropOnLeaf()
Deprecated. 
Returns whether drops are allowed on leaf nodes.

Returns:
true of drops on leafs are allowed

isAutoExpand

public boolean isAutoExpand()
Deprecated. 
Returns true if auto expand is enabled.

Returns:
the auto expand state

setAllowDropOnLeaf

public void setAllowDropOnLeaf(boolean allowDropOnLeaf)
Deprecated. 
True to allow drops on leaf nodes (defaults to false).

Parameters:
allowDropOnLeaf - true to enable drops on leaf nodes

setAutoExpand

public void setAutoExpand(boolean autoExpand)
Deprecated. 
True to automatically expand the active tree item when the user hovers over a collapsed item (defaults to true). Use setAutoExpandDelay(int) to set the delay.

Parameters:
autoExpand - true to auto expand

setAutoExpandDelay

public void setAutoExpandDelay(int autoExpandDelay)
Deprecated. 
Sets the delay used to auto expand items (defualts to 800).

Parameters:
autoExpandDelay - the delay in milliseconds

appendModel

protected void appendModel(ModelData p,
                           TreeModel model,
                           int index)
Deprecated. 

clearStyles

protected void clearStyles(DNDEvent event)
Deprecated. 

handleAppend

protected void handleAppend(DNDEvent event,
                            TreeItem item)
Deprecated. 

handleAppendDrop

protected void handleAppendDrop(DNDEvent event,
                                TreeItem item)
Deprecated. 

handleInsert

protected void handleInsert(DNDEvent event,
                            TreeItem item)
Deprecated. 

handleInsertDrop

protected void handleInsertDrop(DNDEvent event,
                                TreeItem item,
                                int index)
Deprecated. 

onDragDrop

protected void onDragDrop(DNDEvent event)
Deprecated. 
Description copied from class: DropTarget
Called when the user releases the mouse over the target component.

Overrides:
onDragDrop in class DropTarget
Parameters:
event - the dd event

onDragEnter

protected void onDragEnter(DNDEvent e)
Deprecated. 
Description copied from class: DropTarget
Called when the cursor first enters the bounds of the drop target. Subclasses or listeners can change the status of status proxy via the passed event.

Overrides:
onDragEnter in class DropTarget
Parameters:
e - the dd event

onDragLeave

protected void onDragLeave(DNDEvent e)
Deprecated. 
Description copied from class: DropTarget
Called when the cursor leaves the target.

Overrides:
onDragLeave in class DropTarget
Parameters:
e - the dd event

onDragMove

protected void onDragMove(DNDEvent event)
Deprecated. 
Description copied from class: DropTarget
Called when the cursor is moved within the target component. Subclasses or listeners can change the status of status proxy via the passed event. If either a subclass or listener sets BaseEvent.setCancelled(boolean) to true, DropTarget.showFeedback(DNDEvent) will be called.

Overrides:
onDragMove in class DropTarget
Parameters:
event - the dd event

showFeedback

protected void showFeedback(DNDEvent event)
Deprecated. 
Description copied from class: DropTarget
Called as the mouse is moved over the target component. The default implementation does nothing.

Overrides:
showFeedback in class DropTarget
Parameters:
event - the dd event