Search in sources :

Example 1 with PrintDecoderListAction

use of jmri.jmrit.decoderdefn.PrintDecoderListAction in project JMRI by JMRI.

the class Apps method fileMenu.

/**
     * Create default File menu
     *
     * @param menuBar Menu bar to be populated
     * @param wi      WindowInterface where this menu will appear as part of the
     *                menu bar
     */
protected void fileMenu(JMenuBar menuBar, WindowInterface wi) {
    JMenu fileMenu = new JMenu(Bundle.getMessage("MenuFile"));
    menuBar.add(fileMenu);
    fileMenu.add(new PrintDecoderListAction(Bundle.getMessage("MenuPrintDecoderDefinitions"), wi.getFrame(), false));
    fileMenu.add(new PrintDecoderListAction(Bundle.getMessage("MenuPrintPreviewDecoderDefinitions"), wi.getFrame(), true));
    // Use Mac OS X native Quit if using Aqua look and feel
    if (!(SystemType.isMacOSX() && UIManager.getLookAndFeel().isNativeLookAndFeel())) {
        fileMenu.add(new JSeparator());
        fileMenu.add(new AbstractAction(Bundle.getMessage("MenuItemQuit")) {

            @Override
            public void actionPerformed(ActionEvent e) {
                handleQuit();
            }
        });
    }
}
Also used : ActionEvent(java.awt.event.ActionEvent) PrintDecoderListAction(jmri.jmrit.decoderdefn.PrintDecoderListAction) AbstractAction(javax.swing.AbstractAction) JMenu(javax.swing.JMenu) JSeparator(javax.swing.JSeparator)

Example 2 with PrintDecoderListAction

use of jmri.jmrit.decoderdefn.PrintDecoderListAction in project JMRI by JMRI.

the class AppsLaunchFrame method fileMenu.

protected void fileMenu(JMenuBar menuBar, WindowInterface wi) {
    JMenu fileMenu = new JMenu(Bundle.getMessage("MenuFile"));
    menuBar.add(fileMenu);
    fileMenu.add(new PrintDecoderListAction(Bundle.getMessage("MenuPrintDecoderDefinitions"), wi.getFrame(), false));
    fileMenu.add(new PrintDecoderListAction(Bundle.getMessage("MenuPrintPreviewDecoderDefinitions"), wi.getFrame(), true));
}
Also used : PrintDecoderListAction(jmri.jmrit.decoderdefn.PrintDecoderListAction) JMenu(javax.swing.JMenu)

Aggregations

JMenu (javax.swing.JMenu)2 PrintDecoderListAction (jmri.jmrit.decoderdefn.PrintDecoderListAction)2 ActionEvent (java.awt.event.ActionEvent)1 AbstractAction (javax.swing.AbstractAction)1 JSeparator (javax.swing.JSeparator)1