- /**
- * A note to implementors. It is ESSENTIAL that any activities that might block
- * are spawned off as threads rather than waited for during this constructor.
- */
- instance = this;
- if (!Jalview.isJS())
- {
- doVamsasClientCheck();
- }
-
- doConfigureStructurePrefs();
- setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE",
- false);
- boolean showjconsole = jalview.bin.Cache.getDefault("SHOW_JAVA_CONSOLE",
- false);
- desktop = new MyDesktopPane(selmemusage);
- showMemusage.setSelected(selmemusage);
- desktop.setBackground(Color.white);
- getContentPane().setLayout(new BorderLayout());
- // alternate config - have scrollbars - see notes in JAL-153
- // JScrollPane sp = new JScrollPane();
- // sp.getViewport().setView(desktop);
- // getContentPane().add(sp, BorderLayout.CENTER);
- getContentPane().add(desktop, BorderLayout.CENTER);
- desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
-
- // This line prevents Windows Look&Feel resizing all new windows to maximum
- // if previous window was maximised
- desktop.setDesktopManager(new MyDesktopManager(
- (Platform.isWindows() ? new DefaultDesktopManager()
- : Platform.isAMac()
- ? new AquaInternalFrameManager(
- desktop.getDesktopManager())
- : desktop.getDesktopManager())));
-
- Rectangle dims = getLastKnownDimensions("");
- if (dims != null)
- {
- setBounds(dims);
- }
- else
- {
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- int xPos = Math.max(5, (screenSize.width - 900) / 2);
- int yPos = Math.max(5, (screenSize.height - 650) / 2);
- setBounds(xPos, yPos, 900, 650);
- }
-
- boolean doFullLoad = /** @j2sNative ! */true;
-
- if (doFullLoad) {
-
- jconsole = new Console(this, showjconsole);
- // add essential build information
- jconsole.setHeader("Jalview Version: "
- + jalview.bin.Cache.getProperty("VERSION") + "\n"
- + "Jalview Installation: "
- + jalview.bin.Cache.getDefault("INSTALLATION", "unknown")
- + "\n" + "Build Date: "
- + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown") + "\n"
- + "Java version: " + System.getProperty("java.version") + "\n"
- + System.getProperty("os.arch") + " "
- + System.getProperty("os.name") + " "
- + System.getProperty("os.version"));