Search in sources :

Example 1 with PrintSwitchListAction

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));
}
Also used : PrintSwitchListAction(jmri.jmrit.operations.locations.tools.PrintSwitchListAction) Dimension(java.awt.Dimension) JMenuItem(javax.swing.JMenuItem) JMenuBar(javax.swing.JMenuBar) JMenu(javax.swing.JMenu)

Aggregations

Dimension (java.awt.Dimension)1 JMenu (javax.swing.JMenu)1 JMenuBar (javax.swing.JMenuBar)1 JMenuItem (javax.swing.JMenuItem)1 PrintSwitchListAction (jmri.jmrit.operations.locations.tools.PrintSwitchListAction)1