org.apache.click.extras.tree
Interface TreeListener

All Superinterfaces:
Serializable
All Known Subinterfaces:
Tree.JavascriptHandler
All Known Implementing Classes:
CheckboxTree.CheckboxCookieHandler, CheckboxTree.CheckboxSessionHandler, Tree.CookieHandler, Tree.SessionHandler

public interface TreeListener
extends Serializable

The listener interface for receiving tree events.

A common use case for this interface is to lazily load the tree as the user is expanding node's, while traversing the tree.


Method Summary
 void nodeCollapsed(Tree tree, TreeNode node, Context context, boolean previousState)
          Invoked when user collapsed the specified node.
 void nodeDeselected(Tree tree, TreeNode node, Context context, boolean previousState)
          Invoked when user deselected the specified node.
 void nodeExpanded(Tree tree, TreeNode node, Context context, boolean previousState)
          Invoked when user expanded the specified node.
 void nodeSelected(Tree tree, TreeNode node, Context context, boolean previousState)
          Invoked when user selected the specified node.
 

Method Detail

nodeSelected

void nodeSelected(Tree tree,
                  TreeNode node,
                  Context context,
                  boolean previousState)
Invoked when user selected the specified node.

Parameters:
tree - tree the operation was made on
node - node that was selected
context - provides access to Context
previousState - contains the previous selected state

nodeDeselected

void nodeDeselected(Tree tree,
                    TreeNode node,
                    Context context,
                    boolean previousState)
Invoked when user deselected the specified node.

Parameters:
tree - tree the operation was made on
node - node that was deselected
context - provides access to Context
previousState - contains the previous selected state

nodeExpanded

void nodeExpanded(Tree tree,
                  TreeNode node,
                  Context context,
                  boolean previousState)
Invoked when user expanded the specified node.

Parameters:
tree - tree the operation was made on
node - node that was expanded
context - provides access to Context
previousState - contains the previous expanded state

nodeCollapsed

void nodeCollapsed(Tree tree,
                   TreeNode node,
                   Context context,
                   boolean previousState)
Invoked when user collapsed the specified node.

Parameters:
tree - tree the operation was made on
node - node that was collapsed
context - provides access to Context
previousState - contains the previous expanded state