Uses of Class
javax.swing.JMenuItem
| Package | Description |
|---|---|
| javax.swing |
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
|
| javax.swing.plaf.basic |
Provides user interface objects built according to the Basic look and feel.
|
-
Uses of JMenuItem in javax.swing
Subclasses of JMenuItem in javax.swing Modifier and Type Class Description classJCheckBoxMenuItemA menu item that can be selected or deselected.classJMenuAn implementation of a menu -- a popup window containingJMenuItems that is displayed when the user selects an item on theJMenuBar.classJRadioButtonMenuItemAn implementation of a radio button menu item.Methods in javax.swing that return JMenuItem Modifier and Type Method Description JMenuItemJMenu. add(String s)Creates a new menu item with the specified text and appends it to the end of this menu.JMenuItemJMenu. add(Action a)Creates a new menu item attached to the specifiedActionobject and appends it to the end of this menu.JMenuItemJMenu. add(JMenuItem menuItem)Appends a menu item to the end of this menu.JMenuItemJPopupMenu. add(String s)Creates a new menu item with the specified text and appends it to the end of this menu.JMenuItemJPopupMenu. add(Action a)Appends a new menu item to the end of the menu which dispatches the specifiedActionobject.JMenuItemJPopupMenu. add(JMenuItem menuItem)Appends the specified menu item to the end of this menu.protected JMenuItemJMenu. createActionComponent(Action a)Factory method which creates theJMenuItemforActions added to theJMenu.protected JMenuItemJPopupMenu. createActionComponent(Action a)Factory method which creates theJMenuItemforActionsadded to theJPopupMenu.JMenuItemJMenu. getItem(int pos)Returns theJMenuItemat the specified position.JMenuItemJMenu. insert(Action a, int pos)Inserts a new menu item attached to the specifiedActionobject at a given position.JMenuItemJMenu. insert(JMenuItem mi, int pos)Inserts the specifiedJMenuitemat a given position.Methods in javax.swing with parameters of type JMenuItem Modifier and Type Method Description JMenuItemJMenu. add(JMenuItem menuItem)Appends a menu item to the end of this menu.JMenuItemJPopupMenu. add(JMenuItem menuItem)Appends the specified menu item to the end of this menu.protected PropertyChangeListenerJMenu. createActionChangeListener(JMenuItem b)Returns a properly configuredPropertyChangeListenerwhich updates the control as changes to theActionoccur.protected PropertyChangeListenerJPopupMenu. createActionChangeListener(JMenuItem b)Returns a properly configuredPropertyChangeListenerwhich updates the control as changes to theActionoccur.JMenuItemJMenu. insert(JMenuItem mi, int pos)Inserts the specifiedJMenuitemat a given position.voidJMenu. remove(JMenuItem item)Removes the specified menu item from this menu. -
Uses of JMenuItem in javax.swing.plaf.basic
Fields in javax.swing.plaf.basic declared as JMenuItem Modifier and Type Field Description protected JMenuItemBasicMenuItemUI. menuItemThe instance ofJMenuItem.Methods in javax.swing.plaf.basic with parameters of type JMenuItem Modifier and Type Method Description protected voidBasicMenuItemUI. installComponents(JMenuItem menuItem)protected voidBasicMenuItemUI. paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)Draws the background of the menu item.protected voidBasicMenuItemUI. paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)Renders the text of the current menu item.voidBasicCheckBoxMenuItemUI. processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)Invoked when mouse event occurs.voidBasicRadioButtonMenuItemUI. processMouseEvent(JMenuItem item, MouseEvent e, MenuElement[] path, MenuSelectionManager manager)Invoked when mouse event occurs.protected voidBasicMenuItemUI. uninstallComponents(JMenuItem menuItem)Unregisters components.