Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.data.event
Interface TreeListener

All Known Implementing Classes:
  TreeListenerAdapter

    public interface TreeListener

`Tree` listener interface.

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

Method Detail

### onAppend

    void onAppend(Tree tree,
                  Node parent,
                  Node 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,
                           Node parent,
                           Node 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 child node to be appended
  Returns:
    false to cancel the append

### doBeforeInsert

    boolean doBeforeInsert(Tree tree,
                           Node parent,
                           Node node,
                           Node 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 the insert

### doBeforeMove

    boolean doBeforeMove(Tree tree,
                         Node node,
                         Node oldParent,
                         Node 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 the move

### doBeforeRemove

    boolean doBeforeRemove(Tree tree,
                           Node parent,
                           Node node)

  Fires before a child is removed from a node in this tree, return false to cancel the remove.

  Parameters:
    `tree` - the owner tree
    `parent` - the parent node
    `node` - the child node to be removed
  Returns:
    false to cancel the remove

### onInsert

    void onInsert(Tree tree,
                  Node parent,
                  Node node,
                  Node 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

### onMove

    void onMove(Tree tree,
                Node node,
                Node oldParent,
                Node newParent,
                int index)

  Fires when a node is moved to a new location in the tree.

  Parameters:
    `tree` - the owner tree
    `node` - the node moved
    `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 parent,
                  Node node)

  Fires when a child node is removed from a node in this tree.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD