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.menu.event;
10:
11: import com.gwtext.client.core.EventObject;
12: import com.gwtext.client.widgets.menu.BaseItem;
13: import com.gwtext.client.widgets.menu.Menu;
14:
15: public interface MenuListener {
16:
17: /**
18: * Fires before this menu is hidden.
19: *
20: * @param menu this
21: */
22: void doBeforeHide(Menu menu);
23:
24: /**
25: * Fires before this menu is displayed.
26: *
27: * @param menu this
28: */
29: void doBeforeShow(Menu menu);
30:
31: //todo inconsistent order of parms sent my ext, docs say menu item sent, but only id sent
32: /**
33: * Fires when this menu is clicked (or when the enter key is pressed while it is active).
34: *
35: * @param menu this
36: * @param menuItemId the menu item ID
37: * @param e the event object
38: */
39: void onClick(Menu menu, String menuItemId, EventObject e);
40:
41: /**
42: * Fires after this menu is hidden.
43: *
44: * @param menu this
45: */
46: void onHide(Menu menu);
47:
48: //todo ext inconsistent here
49: /**
50: * Fires when a menu item contained in this menu is clicked.
51: *
52: * @param item the clicked item
53: * @param e the event object
54: */
55: void onItemClick(BaseItem item, EventObject e);
56:
57: /**
58: * Fires when the mouse exits this menu.
59: *
60: * @param menu this
61: * @param menuItem the menu item
62: * @param e the event object
63: */
64: void onMouseOut(Menu menu, BaseItem menuItem, EventObject e);
65:
66: /**
67: * Fires when the mouse is hovering over this menu.
68: *
69: * @param menu this
70: * @param menuItem the menu item
71: * @param e the event object
72: */
73: void onMouseOver(Menu menu, BaseItem menuItem, EventObject e);
74:
75: /**
76: * Fires after this menu is displayed.
77: *
78: * @param menu this
79: */
80: void onShow(Menu menu);
81: }
|