|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.dnd.DropTarget
com.extjs.gxt.ui.client.dnd.TreeGridDropTarget
public class TreeGridDropTarget
DropTarget implementation for TreeGrid.
Supported drag data:
Field Summary | |
---|---|
protected TreeGrid.TreeNode |
activeItem
|
protected TreeGrid.TreeNode |
appendItem
|
protected int |
status
|
protected TreeGrid<ModelData> |
treeGrid
|
Fields inherited from class com.extjs.gxt.ui.client.dnd.DropTarget |
---|
component, feedback, operation, overStyle |
Constructor Summary | |
---|---|
TreeGridDropTarget(TreeGrid tree)
|
Method Summary | |
---|---|
protected void |
appendModel(ModelData p,
java.util.List<ModelData> models,
int index)
|
protected void |
bind(TreeGrid tree)
|
protected void |
clearStyle(TreeGrid.TreeNode node)
|
TreeGrid<?> |
getTreeGrid()
Returns the target's tree. |
protected void |
handleAppend(DNDEvent event,
TreeGrid.TreeNode item)
|
protected void |
handleAppendDrop(DNDEvent event,
TreeGrid.TreeNode item)
|
protected void |
handleInsert(DNDEvent event,
TreeGrid.TreeNode item)
|
protected void |
handleInsertDrop(DNDEvent event,
TreeGrid.TreeNode item,
int index)
|
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). |
protected void |
onDragCancelled(DNDEvent event)
Called if the user cancels the drag operations while the mouse is over the target. |
protected void |
onDragDrop(DNDEvent event)
Called when the user releases the mouse over the target component. |
protected void |
onDragEnter(DNDEvent e)
Called when the cursor first enters the bounds of the drop target. |
protected void |
onDragFail(DNDEvent event)
|
protected void |
onDragLeave(DNDEvent e)
Called when the cursor leaves the target. |
protected void |
onDragMove(DNDEvent event)
Called when the cursor is moved within the target component. |
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). |
protected void |
showFeedback(DNDEvent event)
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, 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 |
---|
protected TreeGrid<ModelData> treeGrid
protected TreeGrid.TreeNode activeItem
protected TreeGrid.TreeNode appendItem
protected int status
Constructor Detail |
---|
public TreeGridDropTarget(TreeGrid tree)
Method Detail |
---|
public TreeGrid<?> getTreeGrid()
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
protected void appendModel(ModelData p, java.util.List<ModelData> models, int index)
protected void bind(TreeGrid tree)
protected void clearStyle(TreeGrid.TreeNode node)
protected void handleAppend(DNDEvent event, TreeGrid.TreeNode item)
protected void handleAppendDrop(DNDEvent event, TreeGrid.TreeNode item)
protected void handleInsert(DNDEvent event, TreeGrid.TreeNode item)
protected void handleInsertDrop(DNDEvent event, TreeGrid.TreeNode item, int index)
protected void onDragCancelled(DNDEvent event)
DropTarget
onDragCancelled
in class DropTarget
event
- the dd eventprotected void onDragFail(DNDEvent event)
onDragFail
in class DropTarget
protected void onDragDrop(DNDEvent event)
DropTarget
onDragDrop
in class DropTarget
event
- the dd eventprotected void onDragEnter(DNDEvent e)
DropTarget
onDragEnter
in class DropTarget
e
- the dd eventprotected void onDragLeave(DNDEvent e)
DropTarget
onDragLeave
in class DropTarget
e
- the dd eventprotected void onDragMove(DNDEvent event)
DropTarget
BaseEvent.setCancelled(boolean)
to true, DropTarget.showFeedback(DNDEvent)
will be called.
onDragMove
in class DropTarget
event
- the dd eventprotected void showFeedback(DNDEvent event)
DropTarget
showFeedback
in class DropTarget
event
- the dd event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |