- 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);
-
- // BH 2018 - just an experiment to try unclipped JInternalFrames.
- // Must set for all three to be active:
- if (Jalview.isJS())
- {
- getRootPane().putClientProperty("swingjs.overflow.hidden", "false");
- ((JComponent) getContentPane()).putClientProperty("swingjs.overflow.hidden", "false");
- desktop.putClientProperty("swingjs.overflow.hidden", "false");
- }
-
- 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())));
+ /**
+ * For testing purposes, this constructor can be utilized to allow the creation
+ * of a singleton Desktop instance without the formation of frames. The Cache is
+ * initialized, but that is all.
+ *
+ * It is not currently used.
+ *
+ * @param forInstance
+ */
+ public Desktop(boolean forInstance)
+ {