|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Menu.MenuListener
This interface listens to menu changes or events.
| Method Summary | |
|---|---|
void |
itemChanged(Menu menu,
int oldIndex,
int newIndex,
boolean menuActivated)
The item in the specified menu was changed to the item having the given index. |
void |
itemSelected(Menu menu,
int index)
An item in the specified menu was selected (activated, executed). |
void |
menuShown(Menu menu)
The specified menu was just shown on the display. |
| Method Detail |
|---|
void itemChanged(Menu menu,
int oldIndex,
int newIndex,
boolean menuActivated)
menuActivated
parameter discerns whether the menu was freshly activated or simply
changing items.
The new index can be -1 if the title is showing.
Note: It is possible for the new index to equal the old index, for example when the menu has been activated or when a focus change has been requested and the item is not changed.
Note 2: This can also be called when the index has changed without the menu showing on the display.
menu - the menuoldIndex - the index of the previously shown itemnewIndex - the index of the newly shown itemmenuActivated - indicates whether this menu was newly activated
void itemSelected(Menu menu,
int index)
This method provides a way for menu selection to trigger an action. This will be called whether there is a submenu or not, and before any new menu is shown.
This provides an alternative to Menu.MenuAction which can be
tied to specific menu items rather than the whole menu.
menu - the menuindex - the selected item indexMenu.MenuActionvoid menuShown(Menu menu)
menu - the menuMenu.show(Display, Transition)
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||