static String propertiesFile;
private static boolean propsAreReadOnly = false;
-
+ private static boolean plugin=false;
+ public static void setPlugin(boolean plugin)
+ {
+ Cache.plugin=plugin;
+ }
+ public static boolean isPlugin()
+ {
+ return plugin;
+ }
public static void initLogger()
{
if (log != null)
doGroovyCheck();
setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ setDefaultCloseOperation(!jalview.bin.Cache.isPlugin() ? JFrame.EXIT_ON_CLOSE : JFrame.DISPOSE_ON_CLOSE);
boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE",
false);
boolean showjconsole = jalview.bin.Cache.getDefault(
dialogExecutor.shutdownNow();
}
- System.exit(0);
+ if (!jalview.bin.Cache.isPlugin()) {
+ System.exit(0);
+ } else {
+ setVisible(false);
+ dispose();
+ }
}
private void storeLastKnownDimensions(String string, Rectangle jc)