Search in sources :

Example 1 with PreferencesDialog

use of com.revolsys.swing.preferences.PreferencesDialog in project com.revolsys.open by revolsys.

the class ProjectFrame method newMenuBar.

@Override
protected JMenuBar newMenuBar() {
    final JMenuBar menuBar = super.newMenuBar();
    addMenu(menuBar, newMenuFile());
    final MenuFactory tools = newMenuTools();
    if (OS.isWindows()) {
        tools.addMenuItem("options", "Options...", "Options...", (String) null, () -> {
            new PreferencesDialog().showPanel();
        });
    }
    addMenu(menuBar, tools);
    return menuBar;
}
Also used : MenuFactory(com.revolsys.swing.menu.MenuFactory) PreferencesDialog(com.revolsys.swing.preferences.PreferencesDialog) JMenuBar(javax.swing.JMenuBar)

Example 2 with PreferencesDialog

use of com.revolsys.swing.preferences.PreferencesDialog in project com.revolsys.open by revolsys.

the class MacApplicationListenerHandler method invoke.

@Override
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
    if (method.getName().equals("openFiles")) {
        final Object event = args[0];
        openFiles(event);
    } else if (method.getName().equals("handlePreferences")) {
        final PreferencesDialog preferencesDialog = new PreferencesDialog();
        preferencesDialog.showPanel();
    }
    return null;
}
Also used : PreferencesDialog(com.revolsys.swing.preferences.PreferencesDialog)

Aggregations

PreferencesDialog (com.revolsys.swing.preferences.PreferencesDialog)2 MenuFactory (com.revolsys.swing.menu.MenuFactory)1 JMenuBar (javax.swing.JMenuBar)1