com.gwtext.client.widgets.tree.event
Class TreePanelListenerAdapter

java.lang.Object
  extended by com.gwtext.client.widgets.event.ComponentListenerAdapter
      extended by com.gwtext.client.widgets.event.BoxComponentListenerAdapter
          extended by com.gwtext.client.widgets.event.ContainerListenerAdapter
              extended by com.gwtext.client.widgets.event.PanelListenerAdapter
                  extended by com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter
All Implemented Interfaces:
BoxComponentListener, ComponentListener, ContainerListener, PanelListener, TreePanelListener

public class TreePanelListenerAdapter
extends PanelListenerAdapter
implements TreePanelListener


Constructor Summary
TreePanelListenerAdapter()
           
 
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 treePanel, 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 class com.gwtext.client.widgets.event.PanelListenerAdapter
doBeforeClose, doBeforeCollapse, doBeforeExpand, onActivate, onBodyResize, onClose, onCollapse, onDeactivate, onExpand, onTitleChange
 
Methods inherited from class com.gwtext.client.widgets.event.ContainerListenerAdapter
doBeforeAdd, doBeforeRemove, onAdd, onAfterLayout, onRemove
 
Methods inherited from class com.gwtext.client.widgets.event.BoxComponentListenerAdapter
onMove, onResize
 
Methods inherited from class com.gwtext.client.widgets.event.ComponentListenerAdapter
doBeforeDestroy, doBeforeHide, doBeforeRender, doBeforeShow, doBeforeStateRestore, doBeforeStateSave, onDestroy, onDisable, onEnable, onHide, onRender, onShow, onStateRestore, onStateSave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

TreePanelListenerAdapter

public TreePanelListenerAdapter()
Method Detail

doBeforeChildrenRendered

public boolean doBeforeChildrenRendered(TreeNode node)
Description copied from interface: TreePanelListener
Fires right before the child nodes for a node are rendered.

Specified by:
doBeforeChildrenRendered in interface TreePanelListener
Parameters:
node - the node
Returns:
false to cancel

onAppend

public void onAppend(Tree tree,
                     TreeNode parent,
                     TreeNode node,
                     int index)
Description copied from interface: TreePanelListener
Fires when a new child node is appended to a node in this tree.

Specified by:
onAppend in interface TreePanelListener
Parameters:
tree - The owner tree
parent - The parent node
node - The newly appended node
index - The index of the newly appended node

doBeforeAppend

public boolean doBeforeAppend(Tree tree,
                              TreeNode parent,
                              TreeNode node)
Description copied from interface: TreePanelListener
Fires before a new child is appended to a node in this tree, return false to cancel the append.

Specified by:
doBeforeAppend in interface TreePanelListener
Parameters:
tree - The owner tree
parent - The parent node
node - The newly appended node
Returns:
false to cancel

doBeforeInsert

public boolean doBeforeInsert(Tree tree,
                              TreeNode parent,
                              TreeNode node,
                              TreeNode refNode)
Description copied from interface: TreePanelListener
Fires before a new child is inserted in a node in this tree, return false to cancel the insert.

Specified by:
doBeforeInsert in interface TreePanelListener
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

onInsert

public void onInsert(Tree tree,
                     TreeNode parent,
                     TreeNode node,
                     TreeNode refNode)
Description copied from interface: TreePanelListener
Fires when a new child node is inserted in a node in this tree.

Specified by:
onInsert in interface TreePanelListener
Parameters:
tree - The owner tree
parent - The parent node
node - The child node inserted
refNode - The child node the node was inserted before

doBeforeRemove

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

Specified by:
doBeforeRemove in interface TreePanelListener
Parameters:
tree - the owner tree
parent - the paent node
node - the child node removed
Returns:
false to cancel

onRemove

public void onRemove(Tree tree,
                     TreeNode parent,
                     TreeNode node)
Description copied from interface: TreePanelListener
Fires when a child node is removed from a node in this tree.

Specified by:
onRemove in interface TreePanelListener
Parameters:
tree - the owner tree
parent - the paent node
node - the child node removed

doBeforeClick

public boolean doBeforeClick(TreeNode node,
                             EventObject e)
Description copied from interface: TreePanelListener
Fires before click processing. Return false to cancel the default action.

Specified by:
doBeforeClick in interface TreePanelListener
Parameters:
node - the node
e - the event object
Returns:
false to cancel

doBeforeCollapseNode

public boolean doBeforeCollapseNode(TreeNode node,
                                    boolean deep,
                                    boolean anim)
Description copied from interface: TreePanelListener
Fires before this node is collapsed, return false to cancel.

Specified by:
doBeforeCollapseNode in interface TreePanelListener
Parameters:
node - the node
deep - whether deep collapse
anim - whether animated
Returns:
false to cancel

doBeforeExpandNode

public boolean doBeforeExpandNode(TreeNode node,
                                  boolean deep,
                                  boolean anim)
Description copied from interface: TreePanelListener
Fires before this node is expanded, return false to cancel.

Specified by:
doBeforeExpandNode in interface TreePanelListener
Parameters:
node - the node
deep - whether deep expand
anim - whether animated
Returns:
false to cancel

doBeforeLoad

public boolean doBeforeLoad(TreeNode node)
Description copied from interface: TreePanelListener
Fires before a node is loaded, return false to cancel.

Specified by:
doBeforeLoad in interface TreePanelListener
Parameters:
node - the node
Returns:
false to cancel

doBeforeNodeDrop

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

Specified by:
doBeforeNodeDrop in interface TreePanelListener
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

public void onCheckChange(TreeNode node,
                          boolean checked)
Description copied from interface: TreePanelListener
Fires when a node with a checkbox's checked property changes.

Specified by:
onCheckChange in interface TreePanelListener
Parameters:
node - the node
checked - true if checked

onClick

public void onClick(TreeNode node,
                    EventObject e)
Description copied from interface: TreePanelListener
Fires when this node is clicked.

Specified by:
onClick in interface TreePanelListener
Parameters:
node - the node
e - the event object

onCollapseNode

public void onCollapseNode(TreeNode node)
Description copied from interface: TreePanelListener
Fires when this node is collapsed.

Specified by:
onCollapseNode in interface TreePanelListener
Parameters:
node - the node

onContextMenu

public void onContextMenu(TreeNode node,
                          EventObject e)
Description copied from interface: TreePanelListener
Fires when this node is right clicked.

Specified by:
onContextMenu in interface TreePanelListener
Parameters:
node - the node
e - the event obejct

onDblClick

public void onDblClick(TreeNode node,
                       EventObject e)
Description copied from interface: TreePanelListener
Fires when this node is double clicked.

Specified by:
onDblClick in interface TreePanelListener
Parameters:
node - the node
e - the event object

onDisabledChange

public void onDisabledChange(TreeNode node,
                             boolean disabled)
Description copied from interface: TreePanelListener
Fires when the disabled status of this node changes.

Specified by:
onDisabledChange in interface TreePanelListener
Parameters:
node - the node
disabled - true if disabled

onDragDrop

public void onDragDrop(TreePanel treePanel,
                       TreeNode node,
                       DD dd)
Description copied from interface: TreePanelListener
Fires when a dragged node is dropped on a valid DD target.

Specified by:
onDragDrop in interface TreePanelListener
Parameters:
treePanel - this
node - the node
dd - the DD it was dropped on

onEndDrag

public void onEndDrag(TreePanel treePanel,
                      TreeNode node)
Description copied from interface: TreePanelListener
Fires when a drag operation is complete

Specified by:
onEndDrag in interface TreePanelListener
Parameters:
treePanel - this
node - the node

onExpandNode

public void onExpandNode(TreeNode node)
Description copied from interface: TreePanelListener
Fires when this node is expanded.

Specified by:
onExpandNode in interface TreePanelListener
Parameters:
node - the node

onLoad

public void onLoad(TreeNode node)
Description copied from interface: TreePanelListener
Fires when a node is loaded.

Specified by:
onLoad in interface TreePanelListener
Parameters:
node - the node

onNodeDragOver

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

Specified by:
onNodeDragOver in interface TreePanelListener
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

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

Specified by:
onNodeDrop in interface TreePanelListener
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

doBeforeMoveNode

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

Specified by:
doBeforeMoveNode in interface TreePanelListener
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

onMoveNode

public void onMoveNode(Tree treePanel,
                       TreeNode node,
                       TreeNode oldParent,
                       TreeNode newParent,
                       int index)
Description copied from interface: TreePanelListener
Fires when a node is moved to a new location in the tree.

Specified by:
onMoveNode in interface TreePanelListener
Parameters:
treePanel - 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

onStartDrag

public void onStartDrag(TreePanel treePanel,
                        TreeNode node)
Description copied from interface: TreePanelListener
Fires when a node starts being dragged.

Specified by:
onStartDrag in interface TreePanelListener
Parameters:
treePanel - this
node - the node

onTextChange

public void onTextChange(TreeNode node,
                         java.lang.String text,
                         java.lang.String oldText)
Description copied from interface: TreePanelListener
Fires when the text for this node is changed.

Specified by:
onTextChange in interface TreePanelListener
Parameters:
node - the node
text - the new text
oldText - the old text