|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.apps.MenuWrapper
public abstract class MenuWrapper
Abstract menu wrapper. A menu consists of a number of menu elements, each of which have a text, an enabled status and an int constant from MenuIndexConstants associated with it.
Constructor Summary | |
---|---|
MenuWrapper()
|
Method Summary | |
---|---|
abstract int |
findIndex(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,
String text)
Sets the text of one of the menu elements to a new value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MenuWrapper()
Method Detail |
---|
public abstract int findIndex(Object o)
o
- some object representing part of the menu
MenuIndexConstants
on success
or -1 on failurepublic int getStringIndex(int menuIndex)
MenuIndexConstants
, returns the corresponding
constant in StringIndexConstants
.
menuIndex
- int value from the MenuIndexConstants interface
public 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, String text)
index
- integer index of the menu elementtext
- new text value to be used for this element
|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |