|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.MenuComponent | +--java.awt.MenuItem
A String item that represents a choice in a menu.
Constructor Summary | |
MenuItem(String label)
Constructs a new MenuItem with the specified label. |
Method Summary | |
void |
addNotify()
Creates the menu item's peer. |
void |
disable()
Makes this menu item unselectable by the user. |
void |
enable()
Makes this menu item selectable by the user. |
void |
enable(boolean cond)
Conditionally enables a component. |
String |
getLabel()
Gets the label for this menu item. |
boolean |
isEnabled()
Checks whether the menu item is enabled. |
String |
paramString()
Returns the String parameter of the menu item. |
void |
setLabel(String label)
Sets the label to be the specified label. |
Methods inherited from class java.awt.MenuComponent |
getFont, getParent, getPeer, postEvent, removeNotify, setFont, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MenuItem(String label)
label
- the label for this menu item. Note that "-" is
reserved to mean a separator between menu items.Method Detail |
public void addNotify()
public String getLabel()
public void setLabel(String label)
label
- the label for this menu itempublic boolean isEnabled()
public void enable()
public void enable(boolean cond)
cond
- enabled if true; disabled otherwise.enable()
,
disable()
public void disable()
public String paramString()
paramString
in class MenuComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |