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.event;
10:
11: import com.gwtext.client.core.EventObject;
12: import com.gwtext.client.widgets.Button;
13: import com.gwtext.client.widgets.menu.Menu;
14:
15: public interface ButtonListener extends ComponentListener {
16:
17: /**
18: * Fires when this button is clicked
19: *
20: * @param button this
21: * @param e the event object
22: */
23: void onClick(Button button, EventObject e);
24:
25: /**
26: * If this button has a menu, this event fires when it is hidden.
27: *
28: * @param button his
29: * @param menu the menu
30: */
31: void onMenuHide(Button button, Menu menu);
32:
33: /**
34: * If this button has a menu, this event fires when it is shown.
35: *
36: * @param button this
37: * @param menu the menu
38: */
39: void onMenuShow(Button button, Menu menu);
40:
41: /**
42: * If this button has a menu, this event fires when the mouse leaves the menu triggering element.
43: *
44: * @param button this
45: * @param menu the menu
46: * @param e the event
47: */
48: void onMenuTriggerOut(Button button, Menu menu, EventObject e);
49:
50: /**
51: * If this button has a menu, this event fires when the mouse enters the menu triggering element.
52: *
53: * @param button this
54: * @param menu the menu
55: * @param e the event
56: */
57: void onMenuTriggerOver(Button button, Menu menu, EventObject e);
58:
59: /**
60: * Fires when the mouse exits the button.
61: *
62: * @param button this
63: * @param e the event object
64: */
65: void onMouseOut(Button button, EventObject e);
66:
67: /**
68: * Fires when the mouse hovers over the button.
69: *
70: * @param button this
71: * @param e the event object
72: */
73: void onMouseOver(Button button, EventObject e);
74:
75: /**
76: * Fires when the "pressed" state of this button changes (only if enableToggle = true).
77: *
78: * @param button this
79: * @param pressed true if pressed
80: */
81: void onToggle(Button button, boolean pressed);
82: }
|