instance = this;
doVamsasClientCheck();
doGroovyCheck();
- Image image = null;
- try
- {
- java.net.URL url = getClass().getResource("/images/logo.gif");
-
- if (url != null)
- {
- image = java.awt.Toolkit.getDefaultToolkit().createImage(url);
-
- MediaTracker mt = new MediaTracker(this);
- mt.addImage(image, 0);
- mt.waitForID(0);
- setIconImage(image);
- }
- }
- catch (Exception ex)
- {
- }
-
setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- // desktop = new MyDesktopPane(true);
desktop = new JDesktopPane();
desktop.setBackground(Color.white);
getContentPane().setLayout(new BorderLayout());
/////////Add a splashscreen on startup
/////////Add a splashscreen on startup
- JInternalFrame frame = new JInternalFrame();
-
- SplashScreen splash = new SplashScreen(frame, image);
- frame.setContentPane(splash);
- frame.setLayer(JLayeredPane.PALETTE_LAYER);
- frame.setLocation( (int) ( (getWidth() - 750) / 2),
- (int) ( (getHeight() - 160) / 2));
+ new SplashScreen();
- addInternalFrame(frame, "", 750, 160, false);
discoverer = new jalview.ws.Discoverer(); // Only gets started if gui is displayed.
}
{
groovyShell = new JMenuItem();
groovyShell.setText("Groovy Shell...");
- groovyShell.addActionListener(new ActionListener()
+ groovyShell.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
groovyShell_actionPerformed(e);
- }
+ }
});
toolsMenu.add(groovyShell);
groovyShell.setVisible(true);
}
}
- /**
+ /**
* Accessor method to quickly get all the AlignmentFrames
- * loaded.
- */
+ * loaded.
+ */
protected AlignFrame[] getAlignframes() {
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
-
+
if (frames == null)
{
return null;
* @param iframe DOCUMENT ME!\r
* @param i DOCUMENT ME!\r
*/\r
- public SplashScreen(JInternalFrame iframe, Image i)\r
+ public SplashScreen()\r
{\r
- this.iframe = iframe;\r
- image = i;\r
+ try\r
+ {\r
+ java.net.URL url = getClass().getResource("/images/logo.gif");\r
+\r
+ if (url != null)\r
+ {\r
+ image = java.awt.Toolkit.getDefaultToolkit().createImage(url);\r
+\r
+ MediaTracker mt = new MediaTracker(this);\r
+ mt.addImage(image, 0);\r
+ mt.waitForID(0);\r
+ Desktop.instance.setIconImage(image);\r
+ }\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ }\r
\r
Thread t = new Thread(this);\r
t.start();\r
}\r
}\r
});\r
+\r
+ iframe = new JInternalFrame();\r
+ iframe.setFrameIcon(null);\r
+ iframe.setClosable(false);\r
+ iframe.setContentPane(this);\r
+ iframe.setLayer(JLayeredPane.PALETTE_LAYER);\r
+\r
+ Desktop.desktop.add(iframe);\r
+\r
+ iframe.setVisible(true);\r
+ iframe.setBounds( (int) ( (Desktop.instance.getWidth() - 750) / 2),\r
+ (int) ( (Desktop.instance.getHeight() - 160) / 2),\r
+ 750, 160);\r
}\r
\r
/**\r
{\r
try\r
{\r
+\r
iframe.setClosed(true);\r
}\r
catch (Exception ex)\r