use of jmri.util.WindowMenu in project JMRI by JMRI.
the class ManageLocationsFrame 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);
}
use of jmri.util.WindowMenu in project JMRI by JMRI.
the class RosterFrame method systemsMenu.
protected void systemsMenu() {
ActiveSystemsMenu.addItems(getMenu());
getMenu().add(new WindowMenu(this));
}
use of jmri.util.WindowMenu in project JMRI by JMRI.
the class AppsLaunchFrame method createMenus.
/**
* Add menus to a menu bar.
* <P>
* This does not include the development menu.
*
* @param menuBar the existing menu bar
* @param wi the WindowInterface to associate actions in menus with
* @param pane the JPanel to associate actions in menus with
*/
protected void createMenus(JMenuBar menuBar, WindowInterface wi, AppsLaunchPane pane) {
// the debugging statements in the following are
// for testing startup time
log.debug("start building menus");
fileMenu(menuBar, wi);
editMenu(menuBar, wi);
toolsMenu(menuBar, wi);
rosterMenu(menuBar, wi);
panelMenu(menuBar, wi);
// check to see if operations in main menu
if (jmri.jmrit.operations.setup.Setup.isMainMenuEnabled()) {
operationsMenu(menuBar, wi);
}
systemsMenu(menuBar, wi);
scriptMenu(menuBar, wi);
debugMenu(menuBar, wi, pane);
// * GT 28-AUG-2008 Added window menu
menuBar.add(new WindowMenu(wi));
helpMenu(menuBar, wi, pane);
log.debug("end building menus");
}
use of jmri.util.WindowMenu in project JMRI by JMRI.
the class Apps method createMenus.
/**
* Create default menubar.
* <P>
* This does not include the development menu.
*
* @param menuBar Menu bar to be populated
* @param wi WindowInterface where this menu bar will appear
*/
protected void createMenus(JMenuBar menuBar, WindowInterface wi) {
// the debugging statements in the following are
// for testing startup time
log.debug("start building menus");
if (SystemType.isMacOSX()) {
Application.getApplication().setQuitHandler(new QuitHandler() {
@Override
public boolean handleQuitRequest(EventObject eo) {
return handleQuit();
}
});
}
fileMenu(menuBar, wi);
editMenu(menuBar, wi);
toolsMenu(menuBar, wi);
rosterMenu(menuBar, wi);
panelMenu(menuBar, wi);
// check to see if operations in main menu
if (jmri.jmrit.operations.setup.Setup.isMainMenuEnabled()) {
operationsMenu(menuBar, wi);
}
systemsMenu(menuBar, wi);
scriptMenu(menuBar, wi);
debugMenu(menuBar, wi);
// * GT 28-AUG-2008 Added window menu
menuBar.add(new WindowMenu(wi));
helpMenu(menuBar, wi);
log.debug("end building menus");
}
use of jmri.util.WindowMenu in project JMRI by JMRI.
the class VSDManagerFrame 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);
}
Aggregations