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.form.event;
10:
11: import com.gwtext.client.data.Record;
12: import com.gwtext.client.widgets.form.ComboBox;
13:
14: public interface ComboBoxListener extends FieldListener {
15:
16: /**
17: * Fires before all queries are processed. Return false to cancel the query.
18: *
19: * @param comboBox this
20: * @param cb callback
21: * @return false to cancel the query
22: */
23: boolean doBeforeQuery(ComboBox comboBox, ComboBoxCallback cb);
24:
25: /**
26: * Fires before a list item is selected. Return false to cancel the selection.
27: *
28: * @param comboBox this
29: * @param record the data record returned from the underlying store
30: * @param index the data record returned from the underlying store
31: * @return false to cancel
32: */
33: boolean doBeforeSelect(ComboBox comboBox, Record record, int index);
34:
35: /**
36: * Fires when the dropdown list is collapsed.
37: *
38: * @param comboBox this
39: */
40: void onCollapse(ComboBox comboBox);
41:
42: /**
43: * Fires when the dropdown list is expanded.
44: *
45: * @param comboBox this
46: */
47: void onExpand(ComboBox comboBox);
48:
49: /**
50: * Fires when a list item is selected.
51: *
52: * @param comboBox this
53: * @param record the data record returned from the underlying store
54: * @param index the data record returned from the underlying store
55: */
56: void onSelect(ComboBox comboBox, Record record, int index);
57: }
|