net.sf.click.extras.tree
Interface TreeListener

All Known Subinterfaces:
Tree.JavascriptHandler
All Known Implementing Classes:
Tree.CookieHandler, Tree.SessionHandler

public interface TreeListener

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.

Author:
Bob Schellink

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

Method Detail

nodeSelected

public void nodeSelected(Tree tree,
                         TreeNode node,
                         Context context,
                         boolean oldValue)
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
oldValue - contains the previous value of selected state

nodeDeselected

public void nodeDeselected(Tree tree,
                           TreeNode node,
                           Context context,
                           boolean oldValue)
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
oldValue - contains the previous value of selected state

nodeExpanded

public void nodeExpanded(Tree tree,
                         TreeNode node,
                         Context context,
                         boolean oldValue)
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
oldValue - contains the previous value of expanded state

nodeCollapsed

public void nodeCollapsed(Tree tree,
                          TreeNode node,
                          Context context,
                          boolean oldValue)
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
oldValue - contains the previous value of selected state