M
- the model typepublic class TreeDropTarget<M> extends DropTarget
Tree
to act as the target of a drag and drop operation.
Use DropTarget.setFeedback(com.sencha.gxt.dnd.core.client.DND.Feedback)
to specify whether to allow inserting
items between items, appending items to the end, or both (defaults to
DND.Feedback.BOTH
).
Use DropTarget.setOperation(com.sencha.gxt.dnd.core.client.DND.Operation)
to specify whether to move items or copy
them (defaults to DND.Operation.MOVE
).Modifier and Type | Class and Description |
---|---|
static interface |
TreeDropTarget.TreeDropTargetResources
The tree drop target resources.
|
Constructor and Description |
---|
TreeDropTarget(Tree<M,?> tree)
Creates a drop target for the specified tree.
|
Modifier and Type | Method and Description |
---|---|
Tree<M,?> |
getWidget()
Returns the target's widget.
|
boolean |
isAddChildren()
Returns true if children are being added when inserting into the TreeStore.
|
boolean |
isAllowDropOnLeaf()
Returns whether drops are allowed on leaf nodes.
|
boolean |
isAutoExpand()
Returns true if auto expand is enabled (defaults to true).
|
boolean |
isAutoScroll()
Returns true if auto scroll is enabled (defaults to true).
|
void |
setAddChildren(boolean addChildren)
True to add children when inserting models into the TreeStore (defaults to
false).
|
void |
setAllowDropOnLeaf(boolean allowDropOnLeaf)
True to allow drops on leaf nodes (defaults to false).
|
void |
setAutoExpand(boolean autoExpand)
True to automatically expand the active tree item when the user hovers over
a collapsed item (defaults to true).
|
void |
setAutoExpandDelay(int autoExpandDelay)
Sets the delay used to auto expand items (defaults to 800).
|
void |
setAutoScroll(boolean autoScroll)
True to automatically scroll the tree when the user hovers over the top and
bottom of the tree grid (defaults to true).
|
addDragCancelHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDropHandler, disable, enable, getFeedback, getGroup, getOperation, getOverStyle, isAllowSelfAsSource, isEnabled, release, setAllowSelfAsSource, setFeedback, setGroup, setOperation, setOverStyle
public Tree<M,?> getWidget()
DropTarget
getWidget
in class DropTarget
public boolean isAddChildren()
public boolean isAllowDropOnLeaf()
public boolean isAutoExpand()
public boolean isAutoScroll()
public void setAddChildren(boolean addChildren)
addChildren
- true to add childrenpublic void setAllowDropOnLeaf(boolean allowDropOnLeaf)
allowDropOnLeaf
- true to enable drops on leaf nodespublic void setAutoExpand(boolean autoExpand)
setAutoExpandDelay(int)
to set the delay.autoExpand
- true to auto expandpublic void setAutoExpandDelay(int autoExpandDelay)
autoExpandDelay
- the delay in millisecondspublic void setAutoScroll(boolean autoScroll)
autoScroll
- true to enable auto scrollScrollSupport
Copyright © 2015. All rights reserved.