Search in sources :

Example 1 with AboutHandler

use of jmri.plaf.macosx.AboutHandler in project JMRI by JMRI.

the class Apps3 method initMacOSXMenus.

protected void initMacOSXMenus() {
    jmri.plaf.macosx.Application macApp = jmri.plaf.macosx.Application.getApplication();
    macApp.setAboutHandler(new AboutHandler() {

        @Override
        public void handleAbout(EventObject eo) {
            new AboutDialog(null, true).setVisible(true);
        }
    });
    macApp.setPreferencesHandler(new PreferencesHandler() {

        @Override
        public void handlePreferences(EventObject eo) {
            new TabbedPreferencesAction(Bundle.getMessage("MenuItemPreferences")).actionPerformed();
        }
    });
    macApp.setQuitHandler(new QuitHandler() {

        @Override
        public boolean handleQuitRequest(EventObject eo) {
            return handleQuit();
        }
    });
}
Also used : QuitHandler(jmri.plaf.macosx.QuitHandler) AboutDialog(jmri.swing.AboutDialog) PreferencesHandler(jmri.plaf.macosx.PreferencesHandler) EventObject(java.util.EventObject) AboutHandler(jmri.plaf.macosx.AboutHandler)

Aggregations

EventObject (java.util.EventObject)1 AboutHandler (jmri.plaf.macosx.AboutHandler)1 PreferencesHandler (jmri.plaf.macosx.PreferencesHandler)1 QuitHandler (jmri.plaf.macosx.QuitHandler)1 AboutDialog (jmri.swing.AboutDialog)1