MenuItemNameMenuItem
DescriptionThe MenuItem class represents a selectable item on a menu. Class Definition
public class java.awt.MenuItem extends java.awt.MenuComponent { // Constructors public MenuItem(); public MenuItem (String label); public MenuItem (String label, MenuShortcut s); // Instance Methods public void addActionListener (ActionListener l); public void addNotify(); public void deleteShortcut(); public synchronized void disable(); public synchronized void enable(); public void enable (boolean condition); public String getActionCommand(); public String getLabel(); public MenuShortcut getShortcut(); public boolean isEnabled(); public String paramString(); public void removeActionListener (ActionListener l); public void setActionCommand (String command); public synchronized void setEnabled (boolean b); public synchronized void setLabel (String label); public void setShortcut (MenuShortcut s); // Protected Instance Methods protected final void disableEvents (long eventsToDisable); protected final void enableEvents (long eventsToEnable); protected void processActionEvent (ActionEvent e); protected void processEvent (AWTEvent e); } ConstructorsMenuItempublic MenuItem()
public MenuItem (String label)
public MenuItem (String label, MenuShortcut s)
Instance MethodsaddActionListenerpublic void addActionListener(ActionListener l)
addNotifypublic void addNotify()
deleteShortcutpublic void deleteShortcut()
disablepublic synchronized void disable()
enablepublic synchronized void enable()
public void enable (boolean condition)
getActionCommandpublic String getActionCommand()
getLabelpublic String getLabel()
getShortcutpublic MenuShortcut getShortcut()
isEnabledpublic boolean isEnabled()
paramStringpublic String paramString()
removeActionListenerpublic void removeActionListener(ActionListener l)
setActionCommandpublic void setActionCommand(String command)
setEnabledpublic synchronized void setEnabled (boolean b)
setLabelpublic synchronized void setLabel (String label)
setShortcutpublic void setShortcut (MenuShortcut s)
Protected Instance MethodsdisableEventsprotected final void disableEvents (long eventsToDisable)
enableEventsprotected final void enableEvents (long eventsToEnable)
processActionEventprotected void processActionEvent (ActionEvent e)
processEventprotected void processEvent (AWTEvent e)
See AlsoCheckboxMenuItem, Menu, MenuComponent, MenuShortcut, String |
|