Package com.sencha.gxt.dnd.core.client
Class TreeGridDropTarget<M>
- java.lang.Object
-
- com.sencha.gxt.dnd.core.client.DropTarget
-
- com.sencha.gxt.dnd.core.client.TreeGridDropTarget<M>
-
- Type Parameters:
M- the model type
- All Implemented Interfaces:
DndDragCancelEvent.HasDndDragCancelHandlers,DndDragEnterEvent.HasDndDragEnterHandlers,DndDragLeaveEvent.HasDndDragLeaveHandlers,DndDragMoveEvent.HasDndDragMoveHandlers,DndDropEvent.HasDndDropHandlers
public class TreeGridDropTarget<M> extends DropTarget
Enables a
TreeGridto 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 toDND.Feedback.BOTH).Use
DropTarget.setOperation(com.sencha.gxt.dnd.core.client.DND.Operation)to specify whether to move items or copy them (defaults toDND.Operation.MOVE).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTreeGridDropTarget.TreeGridDropTargetResourcesThe tree drop target resources.
-
Constructor Summary
Constructors Constructor Description TreeGridDropTarget(TreeGrid<M> tree)Creates a drop target for the specified tree grid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeGrid<M>getWidget()Returns the target's widget.booleanisAddChildren()Returns true if children are being added when inserting into the TreeStore.booleanisAllowDropOnLeaf()Returns whether drops are allowed on leaf nodes.booleanisAutoExpand()Returns true if auto expand is enabled (defaults to true).booleanisAutoScroll()Returns true if auto scroll is enabled (defaults to true).voidsetAddChildren(boolean addChildren)True to add children when inserting models into the TreeStore (defaults to false).voidsetAllowDropOnLeaf(boolean allowDropOnLeaf)True to allow drops on leaf nodes (defaults to false).voidsetAutoExpand(boolean autoExpand)True to automatically expand the active tree item when the user hovers over a collapsed item (defaults to true).voidsetAutoExpandDelay(int autoExpandDelay)Sets the delay used to auto expand items (defaults to 800).voidsetAutoScroll(boolean autoScroll)True to automatically scroll the tree when the user hovers over the top and bottom of the tree grid (defaults to true).-
Methods inherited from class com.sencha.gxt.dnd.core.client.DropTarget
addDragCancelHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDropHandler, disable, enable, getFeedback, getGroup, getOperation, getOverStyle, isAllowSelfAsSource, isEnabled, release, setAllowSelfAsSource, setFeedback, setGroup, setOperation, setOverStyle
-
-
-
-
Method Detail
-
getWidget
public TreeGrid<M> getWidget()
Description copied from class:DropTargetReturns the target's widget.- Overrides:
getWidgetin classDropTarget- Returns:
- the widget
-
isAddChildren
public boolean isAddChildren()
Returns true if children are being added when inserting into the TreeStore.- Returns:
- the add children state
-
isAllowDropOnLeaf
public boolean isAllowDropOnLeaf()
Returns whether drops are allowed on leaf nodes.- Returns:
- true of drops on leafs are allowed
-
isAutoExpand
public boolean isAutoExpand()
Returns true if auto expand is enabled (defaults to true).- Returns:
- the auto expand state
-
isAutoScroll
public boolean isAutoScroll()
Returns true if auto scroll is enabled (defaults to true).- Returns:
- true if auto scroll enabled
-
setAddChildren
public void setAddChildren(boolean addChildren)
True to add children when inserting models into the TreeStore (defaults to false).- Parameters:
addChildren- true to add children
-
setAllowDropOnLeaf
public void setAllowDropOnLeaf(boolean allowDropOnLeaf)
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)
True to automatically expand the active tree item when the user hovers over a collapsed item (defaults to true). UsesetAutoExpandDelay(int)to set the delay.- Parameters:
autoExpand- true to auto expand
-
setAutoExpandDelay
public void setAutoExpandDelay(int autoExpandDelay)
Sets the delay used to auto expand items (defaults to 800).- Parameters:
autoExpandDelay- the delay in milliseconds
-
setAutoScroll
public 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).- Parameters:
autoScroll- true to enable auto scroll- See Also:
ScrollSupport
-
-