Search in sources :

Example 6 with WindowMenu

use of jmri.util.WindowMenu in project JMRI by JMRI.

the class ConfigBaseStationFrame method addHelpMenu.

/**
     * Add a standard help menu, including window specific help item.
     *
     * @param ref    JHelp reference for the desired window-specific help page
     * @param direct true if the help menu goes directly to the help system,
     *               e.g. there are no items in the help menu
     *
     * WARNING: BORROWED FROM JmriJFrame.
     */
@Override
public void addHelpMenu(String ref, boolean direct) {
    // only works if no menu present?
    JMenuBar bar = getJMenuBar();
    if (bar == null) {
        bar = new JMenuBar();
    }
    // add Window menu
    // * GT 28-AUG-2008 Added window menu
    bar.add(new WindowMenu(this));
    // add Help menu
    jmri.util.HelpUtil.helpMenu(bar, ref, direct);
    setJMenuBar(bar);
}
Also used : WindowMenu(jmri.util.WindowMenu) JMenuBar(javax.swing.JMenuBar)

Aggregations

WindowMenu (jmri.util.WindowMenu)6 JMenuBar (javax.swing.JMenuBar)3 EventObject (java.util.EventObject)1 QuitHandler (jmri.plaf.macosx.QuitHandler)1