|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mov.ui.MenuHelper
public class MenuHelper
MenuHelper is a class that makes it easier to add menu items to a menu. For example:
JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = MenuHelper.addMenu(menuBar, "File", 'F'); JMenuItem importMenuItem = MenuHelper.addMenuItem(this, fileMenu, "Import Quotes", 'I'); frame.setJMenuBar(menuBar);
Method Summary | |
---|---|
static javax.swing.JCheckBoxMenuItem |
addCheckBoxMenuItem(java.awt.event.ActionListener listener,
javax.swing.JMenuItem parent,
java.lang.String title)
Creates a check box menu item and attaches it to a menu |
static javax.swing.JMenu |
addMenu(javax.swing.JComponent parent,
java.lang.String title)
Creates a menu and attaches it to a component |
static javax.swing.JMenu |
addMenu(javax.swing.JComponent parent,
java.lang.String title,
char key)
Creates a menu and attaches it to a component |
static javax.swing.JMenuItem |
addMenuItem(java.awt.event.ActionListener listener,
javax.swing.JMenuItem parent,
java.lang.String title)
Creates a menu item and attaches it to a menu. |
static javax.swing.JMenuItem |
addMenuItem(java.awt.event.ActionListener listener,
javax.swing.JMenuItem parent,
java.lang.String title,
char key)
Creates a menu item and attaches it to a menu. |
static javax.swing.JMenuItem |
addMenuItem(java.awt.event.ActionListener listener,
javax.swing.JPopupMenu parent,
java.lang.String title)
Creates a menu item and attaches it to a popup menu. |
static javax.swing.JMenuItem |
addMenuItem(java.awt.event.ActionListener listener,
javax.swing.JPopupMenu parent,
java.lang.String title,
char key)
Creates a menu item and attaches it to a popup menu. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.swing.JCheckBoxMenuItem addCheckBoxMenuItem(java.awt.event.ActionListener listener, javax.swing.JMenuItem parent, java.lang.String title)
parent
- The menu to attach the menu item totitle
- The title of the menu itempublic static javax.swing.JMenuItem addMenuItem(java.awt.event.ActionListener listener, javax.swing.JMenuItem parent, java.lang.String title)
parent
- The menu to attach the menu item totitle
- The title of the menu itempublic static javax.swing.JMenuItem addMenuItem(java.awt.event.ActionListener listener, javax.swing.JMenuItem parent, java.lang.String title, char key)
parent
- The menu to attach the menu item totitle
- The title of the menu itemkey
- Accelerator keypublic static javax.swing.JMenuItem addMenuItem(java.awt.event.ActionListener listener, javax.swing.JPopupMenu parent, java.lang.String title)
parent
- The menu to attach the menu item totitle
- The title of the menu itempublic static javax.swing.JMenuItem addMenuItem(java.awt.event.ActionListener listener, javax.swing.JPopupMenu parent, java.lang.String title, char key)
parent
- The menu to attach the menu item totitle
- The title of the menu itemkey
- Accelerator keypublic static javax.swing.JMenu addMenu(javax.swing.JComponent parent, java.lang.String title, char key)
parent
- The component to attach the menu totitle
- The title of the menukey
- The accelerator key for the menupublic static javax.swing.JMenu addMenu(javax.swing.JComponent parent, java.lang.String title)
parent
- The component to attach the menu totitle
- The title of the menu
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |