- /** DOCUMENT ME!! */
- public static Desktop instance;
- public static JDesktopPane desktop;
- static int openFrameCount = 0;
- static final int xOffset = 30;
- static final int yOffset = 30;
- public static jalview.ws.Discoverer discoverer;
-
- public static Object [] jalviewClipboard;
-
- static int fileLoadingCount= 0;
+ /** DOCUMENT ME!! */
+ public static Desktop instance;
+
+ //Need to decide if the Memory Usage is to be included in
+ //Next release or not.
+ public static MyDesktopPane desktop;
+ // public static JDesktopPane desktop;
+
+
+ static int openFrameCount = 0;
+ static final int xOffset = 30;
+ static final int yOffset = 30;
+ public static jalview.ws.Discoverer discoverer;
+
+ public static Object[] jalviewClipboard;
+ public static boolean internalCopy = false;
+
+ static int fileLoadingCount = 0;
+
+ /**
+ * Creates a new Desktop object.
+ */
+ public Desktop()
+ {
+ instance = this;
+ doVamsasClientCheck();
+ doGroovyCheck();
+
+
+ setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
+ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE",false);
+ desktop = new MyDesktopPane(selmemusage);
+ showMemusage.setSelected(selmemusage);
+ desktop.setBackground(Color.white);
+ getContentPane().setLayout(new BorderLayout());
+ 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 DefaultDesktopManager());
+
+ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+ String x = jalview.bin.Cache.getProperty("SCREEN_X");
+ String y = jalview.bin.Cache.getProperty("SCREEN_Y");
+ String width = jalview.bin.Cache.getProperty("SCREEN_WIDTH");
+ String height = jalview.bin.Cache.getProperty("SCREEN_HEIGHT");
+
+ if ( (x != null) && (y != null) && (width != null) && (height != null))
+ {
+ setBounds(Integer.parseInt(x), Integer.parseInt(y),
+ Integer.parseInt(width), Integer.parseInt(height));
+ }
+ else
+ {
+ setBounds( (int) (screenSize.width - 900) / 2,
+ (int) (screenSize.height - 650) / 2, 900, 650);
+ }