Venice 0.7beta

org.mov.ui
Class MenuHelper

java.lang.Object
  extended by org.mov.ui.MenuHelper

public class MenuHelper
extends java.lang.Object

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

addCheckBoxMenuItem

public 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

Parameters:
parent - The menu to attach the menu item to
title - The title of the menu item

addMenuItem

public 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.

Parameters:
parent - The menu to attach the menu item to
title - The title of the menu item

addMenuItem

public 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.

Parameters:
parent - The menu to attach the menu item to
title - The title of the menu item
key - Accelerator key

addMenuItem

public 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.

Parameters:
parent - The menu to attach the menu item to
title - The title of the menu item

addMenuItem

public 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.

Parameters:
parent - The menu to attach the menu item to
title - The title of the menu item
key - Accelerator key

addMenu

public static javax.swing.JMenu addMenu(javax.swing.JComponent parent,
                                        java.lang.String title,
                                        char key)
Creates a menu and attaches it to a component

Parameters:
parent - The component to attach the menu to
title - The title of the menu
key - The accelerator key for the menu

addMenu

public static javax.swing.JMenu addMenu(javax.swing.JComponent parent,
                                        java.lang.String title)
Creates a menu and attaches it to a component

Parameters:
parent - The component to attach the menu to
title - The title of the menu

Venice 0.7beta