01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08:
09: package com.gwtext.client.widgets.tree.event;
10:
11: import com.gwtext.client.widgets.tree.DefaultSelectionModel;
12: import com.gwtext.client.widgets.tree.TreeNode;
13:
14: /**
15: * Listener for DefaultSelectionModel.
16: *
17: * @author Sanjiv Jivan
18: * @see DefaultSelectionModel
19: */
20: public interface DefaultSelectionModelListener {
21:
22: /**
23: * Fires before the selected node changes, return false to cancel the change.
24: *
25: * @param sm selection model
26: * @param newNode the new selection
27: * @param oldNode the old selection
28: * @return false to cancel change
29: */
30: boolean doBeforeSelect(DefaultSelectionModel sm, TreeNode newNode,
31: TreeNode oldNode);
32:
33: /**
34: * Fires when the selected node changes. Note TreeNode passed is null when clearSelection is called,
35: * or when a node is unselected.
36: *
37: * @param sm selection model
38: * @param node new selection
39: */
40: void onSelectionChange(DefaultSelectionModel sm, TreeNode node);
41: }
|