+/*\r
+ * Jalview - A Sequence Alignment Editor and Viewer\r
+ * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
package jalview.gui;\r
\r
-import javax.swing.*;\r
import java.awt.*;\r
import java.awt.event.*;\r
+import javax.swing.*;\r
\r
-public class SplashScreen extends JPanel implements Runnable\r
+public class SplashScreen\r
+ extends JPanel implements Runnable\r
{\r
boolean visible = true;\r
JInternalFrame iframe;\r
Image image;\r
+ int fontSize = 11;\r
+ int yoffset = 30;\r
\r
public SplashScreen(JInternalFrame iframe, Image i)\r
{\r
this.iframe = iframe;\r
image = i;\r
+\r
Thread t = new Thread(this);\r
t.start();\r
addMouseListener(new MouseAdapter()\r
- { public void mousePressed(MouseEvent evt)\r
+ {\r
+ public void mousePressed(MouseEvent evt)\r
{\r
try\r
- { closeSplash(); }\r
+ {\r
+ closeSplash();\r
+ }\r
catch (Exception ex)\r
- {}\r
+ {\r
+ }\r
}\r
- });\r
+ });\r
}\r
\r
-\r
public void run()\r
{\r
- long startTime = System.currentTimeMillis()/1000;\r
+ long startTime = System.currentTimeMillis() / 1000;\r
\r
- while( visible )\r
+ while (visible)\r
{\r
- if( System.currentTimeMillis()/1000 - startTime > 5)\r
+ if ( ( (System.currentTimeMillis() / 1000) - startTime) > 5)\r
+ {\r
visible = false;\r
+ }\r
\r
- try{\r
- Thread.sleep(400);\r
- iframe.setSelected(true);\r
+ try\r
+ {\r
+ Thread.sleep(1000);\r
+ }\r
+ catch (Exception ex)\r
+ {\r
}\r
- catch(Exception ex){}\r
}\r
\r
closeSplash();\r
-\r
}\r
\r
public void closeSplash()\r
iframe.setClosed(true);\r
}\r
catch (Exception ex)\r
- {}\r
-\r
+ {\r
+ }\r
}\r
\r
-\r
public void paintComponent(Graphics g)\r
{\r
g.setColor(Color.white);\r
- g.fillRect(0,0,getWidth(),getHeight());\r
+ g.fillRect(0, 0, getWidth(), getHeight());\r
g.setColor(Color.black);\r
- g.setFont( new Font("Verdana", Font.BOLD, 18));\r
- if(image!=null)\r
- g.drawImage(image, 5,60,this);\r
- g.drawString("JalView 2005", 50,50);\r
- g.setFont( new Font("Verdana", Font.BOLD, 14));\r
- g.drawString("Authors: Michele Clamp, James Cuff, Steve Searle, Andrew Waterhouse, Jim Procter & Geoff Barton.",50,70);\r
- g.drawString("Current development managed by Andrew Waterhouse; Barton Group, University of Dundee.",50,90);\r
- g.drawString("If you use JalView, please cite:",50,110);\r
- g.drawString("\"Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), The Jalview Java Alignment Editor\"",50,130);\r
+ g.setFont(new Font("Verdana", Font.BOLD, fontSize + 6));\r
\r
- }\r
+ if (image != null)\r
+ {\r
+ g.drawImage(image, 5, yoffset + 12, this);\r
+ }\r
\r
+ g.drawString("JalView 2005 ", 50, yoffset);\r
+ g.setFont(new Font("Verdana", Font.BOLD, fontSize + 2));\r
+ g.drawString("Version " + jalview.bin.Cache.VERSION +\r
+ "; Last updated: " + jalview.bin.Cache.BUILD_DATE, 180,\r
+ yoffset);\r
+ g.setFont(new Font("Verdana", Font.BOLD, fontSize));\r
+ g.drawString("Authors: Michele Clamp, James Cuff, Steve Searle, Andrew Waterhouse, Jim Procter & Geoff Barton.",\r
+ 50, yoffset + 20);\r
+ g.drawString("Current development managed by Andrew Waterhouse; Barton Group, University of Dundee.",\r
+ 50, yoffset + 24 + fontSize);\r
+ g.drawString("If you use JalView, please cite: Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004),",\r
+ 50, yoffset + 28 + (fontSize * 2));\r
+ g.drawString(\r
+ "\"The Jalview Java Alignment Editor\" Bioinformatics, 2004 12;426-7.",\r
+ 50, yoffset + 32 + (fontSize * 3));\r
+ }\r
}\r