use of jmri.jmrit.operations.locations.tools.PrintSwitchListAction in project JMRI by JMRI.
the class YardmasterFrame method initComponents.
private void initComponents(Location location) {
super.initComponents();
if (location != null) {
// build menu
JMenuBar menuBar = new JMenuBar();
JMenu toolMenu = new JMenu(Bundle.getMessage("MenuTools"));
toolMenu.add(new YardmasterByTrackAction(location));
JMenuItem print = toolMenu.add(new PrintSwitchListAction(Bundle.getMessage("MenuItemPrint"), location, false));
JMenuItem preview = toolMenu.add(new PrintSwitchListAction(Bundle.getMessage("MenuItemPreview"), location, true));
menuBar.add(toolMenu);
setJMenuBar(menuBar);
// add tool tip if in consolidation mode: "Disabled when switch list is in consolidation mode"
if (!Setup.isSwitchListRealTime()) {
print.setToolTipText(Bundle.getMessage("TipDisabled"));
preview.setToolTipText(Bundle.getMessage("TipDisabled"));
}
setTitle(Bundle.getMessage("Yardmaster") + " (" + location.getName() + ")");
}
// NOI18N
addHelpMenu("package.jmri.jmrit.operations.Operations_Locations", true);
initMinimumSize(new Dimension(Control.panelWidth500, Control.panelHeight500));
}
Aggregations