* change the line numbers
*/
+ /*
if (!Platform.isAMac())
{
// this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
else
- {
- // this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
- java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
+ */
+ // {
+ // this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+ java.awt.Desktop hdesktop = java.awt.Desktop.getDesktop();
- desktop.setAboutHandler(new AboutHandler()
+ hdesktop.setAboutHandler(new AboutHandler()
+ {
+ @Override
+ public void handleAbout(AboutEvent e)
{
- @Override
- public void handleAbout(AboutEvent e)
- {
- aboutMenuItem_actionPerformed(null);
- }
- });
- desktop.setPreferencesHandler(new PreferencesHandler()
+ aboutMenuItem_actionPerformed(null);
+ }
+ });
+ hdesktop.setPreferencesHandler(new PreferencesHandler()
+ {
+ @Override
+ public void handlePreferences(PreferencesEvent e)
{
- @Override
- public void handlePreferences(PreferencesEvent e)
+ preferences_actionPerformed(null);
+ }
+ });
+ hdesktop.setQuitHandler(new QuitHandler()
+ {
+ @Override
+ public void handleQuitRequestWith(QuitEvent e, QuitResponse r)
+ {
+ int n = JOptionPane.showConfirmDialog(null,
+ MessageManager.getString("label.quit_jalview"),
+ MessageManager.getString("action.quit"),
+ JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE,
+ null);
+ if (n == JOptionPane.OK_OPTION)
{
- preferences_actionPerformed(null);
+ System.out.println("Shortcut Quit confirmed by user");
+ quit();
}
- });
- desktop.setQuitHandler(new QuitHandler()
- {
- @Override
- public void handleQuitRequestWith(QuitEvent e, QuitResponse r)
- {
- int n = JOptionPane.showConfirmDialog(null,
- MessageManager.getString("label.quit_jalview"),
- MessageManager.getString("action.quit"),
- JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE,
- null);
- if (n == JOptionPane.OK_OPTION)
- {
- System.out.println("Shortcut Quit confirmed by user");
- quit();
- }
- else
- {
- System.out.println("Shortcut Quit cancelled by user");
- }
+ else
+ {
+ System.out.println("Shortcut Quit cancelled by user");
}
- });
+ }
+ });
- addWindowListener(new WindowAdapter()
- {
+ // }
- @Override
- public void windowClosing(WindowEvent ev)
- {
- quit();
- }
- });
- }
+ addWindowListener(new WindowAdapter()
+ {
+
+ @Override
+ public void windowClosing(WindowEvent ev)
+ {
+ quit();
+ }
+ });
boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE",
false);