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