|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.apps.MenuWrapper
net.sourceforge.jiu.gui.awt.AwtMenuWrapper
A wrapper around an AWT MenuBar object.
Constructor Summary | |
AwtMenuWrapper(Strings strings,
ActionListener actionListener)
Internally creates a MenuBar object and provides methods to update that menu bar. |
Method Summary | |
int |
findIndex(Object o)
Attempts to find one of the menu items in the internal list. |
MenuBar |
getMenuBar()
|
void |
setEnabled(int index,
boolean enabled)
Sets the enabled status of one of the menu items to either true or false . |
void |
setLabel(int index,
String text)
Sets the text of one of the menu elements to a new value. |
void |
updateEnabled(OperationProcessor op)
|
void |
updateLabels(Strings strings)
|
Methods inherited from class net.sourceforge.jiu.apps.MenuWrapper |
getStringIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AwtMenuWrapper(Strings strings, ActionListener actionListener)
strings
- String resource used to initialize menu itemsactionListener
- a listener which will be registered with all menu itemsMethod Detail |
public int findIndex(Object o)
findIndex
in class MenuWrapper
o
- some object representing part of the menu
MenuIndexConstants
on success
or -1 on failurepublic MenuBar getMenuBar()
public void setEnabled(int index, boolean enabled)
MenuWrapper
true
or false
.
setEnabled
in class MenuWrapper
index
- menu index of the component whose status is to be resetenabled
- boolean with the new valuepublic void setLabel(int index, String text)
MenuWrapper
setLabel
in class MenuWrapper
index
- integer index of the menu elementtext
- new text value to be used for this elementpublic void updateEnabled(OperationProcessor op)
public void updateLabels(Strings strings)
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |