com.gwtext.client.data.event
Interface NodeListener

All Known Subinterfaces:
TreeNodeListener
All Known Implementing Classes:
NodeListenerAdapter, TreeNodeListenerAdapter

public interface NodeListener

Node listener interface.


Method Summary
 boolean doBeforeAppend(Tree tree, Node self, Node node)
          Fires before a new child is appended, return false to cancel the append.
 boolean doBeforeInsert(Tree tree, Node self, Node node, Node refNode)
          Fires before a new child is inserted, return false to cancel the insert.
 boolean doBeforeMove(Tree tree, Node self, Node oldParent, Node newParent, int index)
          Fires before this node is moved to a new location in the tree.
 boolean doBeforeRemove(Tree tree, Node self, Node node)
          Fires before a child is removed, return false to cancel the remove.
 void onAppend(Tree tree, Node self, Node node, int index)
          Fires when a new child node is appended.
 void onInsert(Tree tree, Node self, Node node, Node refNode)
          Fires when a new child node is inserted.
 void onMove(Tree tree, Node self, Node oldParent, Node newParent, int index)
          Fires when this node is moved to a new location in the tree.
 void onRemove(Tree tree, Node self, Node node)
          Fires before a child is removed, return false to cancel the remove.
 

Method Detail

onAppend

void onAppend(Tree tree,
              Node self,
              Node node,
              int index)
Fires when a new child node is appended.

Parameters:
tree - the owner tree
self - this node
node - the newly appended node
index - the index of the newly appended node

doBeforeAppend

boolean doBeforeAppend(Tree tree,
                       Node self,
                       Node node)
Fires before a new child is appended, return false to cancel the append.

Parameters:
tree - the owner tree
self - this node
node - the child node to be appended
Returns:
false to cancel the append

doBeforeInsert

boolean doBeforeInsert(Tree tree,
                       Node self,
                       Node node,
                       Node refNode)
Fires before a new child is inserted, return false to cancel the insert.

Parameters:
tree - the owner tree
self - this node
node - the child node to be inserted
refNode - the child node the node is being inserted before
Returns:
false to cancel the insert

doBeforeMove

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

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

doBeforeRemove

boolean doBeforeRemove(Tree tree,
                       Node self,
                       Node node)
Fires before a child is removed, return false to cancel the remove.

Parameters:
tree - the owner tree
self - this node
node - the child node to be removed
Returns:
false to cancel the remove

onInsert

void onInsert(Tree tree,
              Node self,
              Node node,
              Node refNode)
Fires when a new child node is inserted.

Parameters:
tree - the owner tree
self - this node
node - the child node inserted
refNode - the child node the node was inserted before

onMove

void onMove(Tree tree,
            Node self,
            Node oldParent,
            Node newParent,
            int index)
Fires when this node is moved to a new location in the tree.

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

onRemove

void onRemove(Tree tree,
              Node self,
              Node node)
Fires before a child is removed, return false to cancel the remove.

Parameters:
tree - the owner tree
self - this node
node - the child node to be removed