public abstract class MenuWrapper
extends java.lang.Object
| Constructor and Description |
|---|
MenuWrapper() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
findIndex(java.lang.Object o)
Attempts to find the index of a given object that represents a menu element.
|
int |
getStringIndex(int menuIndex)
For one of the values in
MenuIndexConstants, returns the corresponding
constant in StringIndexConstants. |
abstract void |
setEnabled(int index,
boolean enabled)
Sets the enabled status of one of the menu items to either
true or false. |
abstract void |
setLabel(int index,
java.lang.String text)
Sets the text of one of the menu elements to a new value.
|
public abstract int findIndex(java.lang.Object o)
o - some object representing part of the menuMenuIndexConstants on success
or -1 on failurepublic int getStringIndex(int menuIndex)
MenuIndexConstants, returns the corresponding
constant in StringIndexConstants.menuIndex - int value from the MenuIndexConstants interfacepublic abstract void setEnabled(int index,
boolean enabled)
true or false.index - menu index of the component whose status is to be resetenabled - boolean with the new valuepublic abstract void setLabel(int index,
java.lang.String text)
index - integer index of the menu elementtext - new text value to be used for this element