com.gwtext.client.widgets.tree.event
Interface TreePanelListener

All Superinterfaces:
BoxComponentListener, ComponentListener, ContainerListener, PanelListener
All Known Implementing Classes:
TreePanelListenerAdapter

public interface TreePanelListener
extends PanelListener


Method Summary
 boolean doBeforeAppend(Tree tree, TreeNode parent, TreeNode node)
          Fires before a new child is appended to a node in this tree, return false to cancel the append.
 boolean doBeforeChildrenRendered(TreeNode node)
          Fires right before the child nodes for a node are rendered.
 boolean doBeforeClick(TreeNode node, EventObject e)
          Fires before click processing.
 boolean doBeforeCollapseNode(TreeNode node, boolean deep, boolean anim)
          Fires before this node is collapsed, return false to cancel.
 boolean doBeforeExpandNode(TreeNode node, boolean deep, boolean anim)
          Fires before this node is expanded, return false to cancel.
 boolean doBeforeInsert(Tree tree, TreeNode parent, TreeNode node, TreeNode refNode)
          Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
 boolean doBeforeLoad(TreeNode node)
          Fires before a node is loaded, return false to cancel.
 boolean doBeforeMoveNode(Tree tree, TreeNode node, TreeNode oldParent, TreeNode newParent, int index)
          Fires before a node is moved to a new location in the tree.
 boolean doBeforeNodeDrop(TreePanel treePanel, TreeNode target, DragData dragData, java.lang.String point, DragDrop source, TreeNode dropNode, DropNodeCallback dropNodeCallback)
          Fires when a DD object is dropped on a node in this tree for preprocessing.
 boolean doBeforeRemove(Tree tree, TreeNode parent, TreeNode node)
          Fires before a child node is removed from a node in this tree.
 void onAppend(Tree tree, TreeNode parent, TreeNode node, int index)
          Fires when a new child node is appended to a node in this tree.
 void onCheckChange(TreeNode node, boolean checked)
          Fires when a node with a checkbox's checked property changes.
 void onClick(TreeNode node, EventObject e)
          Fires when this node is clicked.
 void onCollapseNode(TreeNode node)
          Fires when this node is collapsed.
 void onContextMenu(TreeNode node, EventObject e)
          Fires when this node is right clicked.
 void onDblClick(TreeNode node, EventObject e)
          Fires when this node is double clicked.
 void onDisabledChange(TreeNode node, boolean disabled)
          Fires when the disabled status of this node changes.
 void onDragDrop(TreePanel treePanel, TreeNode node, DD dd)
          Fires when a dragged node is dropped on a valid DD target.
 void onEndDrag(TreePanel treePanel, TreeNode node)
          Fires when a drag operation is complete
 void onExpandNode(TreeNode node)
          Fires when this node is expanded.
 void onInsert(Tree tree, TreeNode parent, TreeNode node, TreeNode refNode)
          Fires when a new child node is inserted in a node in this tree.
 void onLoad(TreeNode node)
          Fires when a node is loaded.
 void onMoveNode(Tree tree, TreeNode node, TreeNode oldParent, TreeNode newParent, int index)
          Fires when a node is moved to a new location in the tree.
 boolean onNodeDragOver(TreePanel treePanel, TreeNode target, DragData dragData, java.lang.String point, DragDrop source, TreeNode dropNode)
          Fires when a tree node is being targeted for a drag drop, return false to signal drop not allowed.
 void onNodeDrop(TreePanel treePanel, TreeNode target, DragData dragData, java.lang.String point, DragDrop source, TreeNode dropNode)
          Fires after a DD object is dropped on a node in this tree.
 void onRemove(Tree tree, TreeNode parent, TreeNode node)
          Fires when a child node is removed from a node in this tree.
 void onStartDrag(TreePanel treePanel, TreeNode node)
          Fires when a node starts being dragged.
 void onTextChange(TreeNode node, java.lang.String text, java.lang.String oldText)
          Fires when the text for this node is changed.
 
Methods inherited from interface com.gwtext.client.widgets.event.PanelListener
doBeforeClose, doBeforeCollapse, doBeforeExpand, onActivate, onBodyResize, onClose, onCollapse, onDeactivate, onExpand, onTitleChange
 
Methods inherited from interface com.gwtext.client.widgets.event.ContainerListener
doBeforeAdd, doBeforeRemove, onAdd, onAfterLayout, onRemove
 
Methods inherited from interface com.gwtext.client.widgets.event.BoxComponentListener
onMove, onResize
 
Methods inherited from interface com.gwtext.client.widgets.event.ComponentListener
doBeforeDestroy, doBeforeHide, doBeforeRender, doBeforeShow, doBeforeStateRestore, doBeforeStateSave, onDestroy, onDisable, onEnable, onHide, onRender, onShow, onStateRestore, onStateSave
 

Method Detail

onAppend

void onAppend(Tree tree,
              TreeNode parent,
              TreeNode node,
              int index)
Fires when a new child node is appended to a node in this tree.

Parameters:
tree - The owner tree
parent - The parent node
node - The newly appended node
index - The index of the newly appended node

doBeforeAppend

boolean doBeforeAppend(Tree tree,
                       TreeNode parent,
                       TreeNode node)
Fires before a new child is appended to a node in this tree, return false to cancel the append.

Parameters:
tree - The owner tree
parent - The parent node
node - The newly appended node
Returns:
false to cancel

doBeforeChildrenRendered

boolean doBeforeChildrenRendered(TreeNode node)
Fires right before the child nodes for a node are rendered.

Parameters:
node - the node
Returns:
false to cancel

doBeforeClick

boolean doBeforeClick(TreeNode node,
                      EventObject e)
Fires before click processing. Return false to cancel the default action.

Parameters:
node - the node
e - the event object
Returns:
false to cancel

doBeforeCollapseNode

boolean doBeforeCollapseNode(TreeNode node,
                             boolean deep,
                             boolean anim)
Fires before this node is collapsed, return false to cancel.

Parameters:
node - the node
deep - whether deep collapse
anim - whether animated
Returns:
false to cancel

doBeforeExpandNode

boolean doBeforeExpandNode(TreeNode node,
                           boolean deep,
                           boolean anim)
Fires before this node is expanded, return false to cancel.

Parameters:
node - the node
deep - whether deep expand
anim - whether animated
Returns:
false to cancel

doBeforeInsert

boolean doBeforeInsert(Tree tree,
                       TreeNode parent,
                       TreeNode node,
                       TreeNode refNode)
Fires before a new child is inserted in a node in this tree, return false to cancel the insert.

Parameters:
tree - The owner tree
parent - The parent node
node - The child node to be inserted
refNode - The child node the node is being inserted before
Returns:
false to cancel

doBeforeLoad

boolean doBeforeLoad(TreeNode node)
Fires before a node is loaded, return false to cancel.

Parameters:
node - the node
Returns:
false to cancel

doBeforeMoveNode

boolean doBeforeMoveNode(Tree tree,
                         TreeNode node,
                         TreeNode oldParent,
                         TreeNode newParent,
                         int index)
Fires before a node is moved to a new location in the tree. Return false to cancel the move.

Parameters:
tree - The owner tree
node - The node being moved
oldParent - The parent of the node
newParent - The new parent the node is moving to
index - The index it is being moved to
Returns:
false to cancel

doBeforeNodeDrop

boolean doBeforeNodeDrop(TreePanel treePanel,
                         TreeNode target,
                         DragData dragData,
                         java.lang.String point,
                         DragDrop source,
                         TreeNode dropNode,
                         DropNodeCallback dropNodeCallback)
Fires when a DD object is dropped on a node in this tree for preprocessing. Return false to cancel the drop.

Parameters:
treePanel - this
target - the node being targeted for the drop
dragData - the drag data
point - the point of the drop - append, above or below
source - the drag source
dropNode - drop node provided by the source
dropNodeCallback - call setDropNode / setDropNodes on this callback to use a custon drop node. Can by used to drop a copy of the originally dropped
Returns:
false to cancel

onCheckChange

void onCheckChange(TreeNode node,
                   boolean checked)
Fires when a node with a checkbox's checked property changes.

Parameters:
node - the node
checked - true if checked

onClick

void onClick(TreeNode node,
             EventObject e)
Fires when this node is clicked.

Parameters:
node - the node
e - the event object

onCollapseNode

void onCollapseNode(TreeNode node)
Fires when this node is collapsed.

Parameters:
node - the node

onContextMenu

void onContextMenu(TreeNode node,
                   EventObject e)
Fires when this node is right clicked.

Parameters:
node - the node
e - the event obejct

onDblClick

void onDblClick(TreeNode node,
                EventObject e)
Fires when this node is double clicked.

Parameters:
node - the node
e - the event object

onDisabledChange

void onDisabledChange(TreeNode node,
                      boolean disabled)
Fires when the disabled status of this node changes.

Parameters:
node - the node
disabled - true if disabled

onDragDrop

void onDragDrop(TreePanel treePanel,
                TreeNode node,
                DD dd)
Fires when a dragged node is dropped on a valid DD target.

Parameters:
treePanel - this
node - the node
dd - the DD it was dropped on

onEndDrag

void onEndDrag(TreePanel treePanel,
               TreeNode node)
Fires when a drag operation is complete

Parameters:
treePanel - this
node - the node

onExpandNode

void onExpandNode(TreeNode node)
Fires when this node is expanded.

Parameters:
node - the node

onInsert

void onInsert(Tree tree,
              TreeNode parent,
              TreeNode node,
              TreeNode refNode)
Fires when a new child node is inserted in a node in this tree.

Parameters:
tree - The owner tree
parent - The parent node
node - The child node inserted
refNode - The child node the node was inserted before

onLoad

void onLoad(TreeNode node)
Fires when a node is loaded.

Parameters:
node - the node

onNodeDragOver

boolean onNodeDragOver(TreePanel treePanel,
                       TreeNode target,
                       DragData dragData,
                       java.lang.String point,
                       DragDrop source,
                       TreeNode dropNode)
Fires when a tree node is being targeted for a drag drop, return false to signal drop not allowed.

Parameters:
treePanel - this
target - the node being targeted for the drop
dragData - the drag data
point - the point of the drop - append, above or below
source - the drag source
dropNode - Drop node provided by the source @return false to cancel
Returns:
false to cancel

onNodeDrop

void onNodeDrop(TreePanel treePanel,
                TreeNode target,
                DragData dragData,
                java.lang.String point,
                DragDrop source,
                TreeNode dropNode)
Fires after a DD object is dropped on a node in this tree.

Parameters:
treePanel - this
target - the node being targeted for the drop
dragData - the drag data
point - the point of the drop - append, above or below
source - the drag source
dropNode - Drop node provided by the source

onMoveNode

void onMoveNode(Tree tree,
                TreeNode node,
                TreeNode oldParent,
                TreeNode newParent,
                int index)
Fires when a node is moved to a new location in the tree.

Parameters:
tree - the owner tree
node - the node
oldParent - the old parent of this node
newParent - the new parent of this node
index - the index it was moved to

doBeforeRemove

boolean doBeforeRemove(Tree tree,
                       TreeNode parent,
                       TreeNode node)
Fires before a child node is removed from a node in this tree. Return false to cancel.

Parameters:
tree - the owner tree
parent - the paent node
node - the child node removed
Returns:
false to cancel

onRemove

void onRemove(Tree tree,
              TreeNode parent,
              TreeNode node)
Fires when a child node is removed from a node in this tree.

Parameters:
tree - the owner tree
parent - the paent node
node - the child node removed

onStartDrag

void onStartDrag(TreePanel treePanel,
                 TreeNode node)
Fires when a node starts being dragged.

Parameters:
treePanel - this
node - the node

onTextChange

void onTextChange(TreeNode node,
                  java.lang.String text,
                  java.lang.String oldText)
Fires when the text for this node is changed.

Parameters:
node - the node
text - the new text
oldText - the old text