~ubuntu-branches/ubuntu/saucy/fastqc/saucy-proposed

« back to all changes in this revision

Viewing changes to uk/ac/babraham/FastQC/Dialogs/AboutDialog.java

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2012-11-20 13:38:32 UTC
  • Revision ID: package-import@ubuntu.com-20121120133832-psohzlsak64g7bdy
Tags: upstream-0.10.1+dfsg
ImportĀ upstreamĀ versionĀ 0.10.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Copyright Copyright 2010-12 Simon Andrews
 
3
 *
 
4
 *    This file is part of FastQC.
 
5
 *
 
6
 *    FastQC is free software; you can redistribute it and/or modify
 
7
 *    it under the terms of the GNU General Public License as published by
 
8
 *    the Free Software Foundation; either version 3 of the License, or
 
9
 *    (at your option) any later version.
 
10
 *
 
11
 *    FastQC is distributed in the hope that it will be useful,
 
12
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *    GNU General Public License for more details.
 
15
 *
 
16
 *    You should have received a copy of the GNU General Public License
 
17
 *    along with FastQC; if not, write to the Free Software
 
18
 *    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
package uk.ac.babraham.FastQC.Dialogs;
 
21
 
 
22
import javax.swing.*;
 
23
 
 
24
import uk.ac.babraham.FastQC.FastQCApplication;
 
25
 
 
26
import java.awt.*;
 
27
import java.awt.event.*;
 
28
 
 
29
/**
 
30
 * Shows the generic about dialog giving details of the current version
 
31
 * and copyright assignments.  This is just a thin shell around the 
 
32
 * SeqMonkTitlePanel which actually holds the relevant information and
 
33
 * which is also used on the welcome screen.
 
34
 */
 
35
public class AboutDialog extends JDialog {
 
36
 
 
37
    /**
 
38
     * Instantiates a new about dialog.
 
39
     * 
 
40
     * @param a The SeqMonk application.
 
41
     */
 
42
    public AboutDialog (FastQCApplication a) {
 
43
        super(a);
 
44
        setTitle("About FastQC...");  
 
45
        Container cont = getContentPane();
 
46
        cont.setLayout(new BorderLayout());
 
47
        
 
48
        add(new FastQCTitlePanel(),BorderLayout.CENTER);
 
49
 
 
50
        JPanel buttonPanel = new JPanel();
 
51
        
 
52
        JButton closeButton = new JButton("Close");
 
53
        getRootPane().setDefaultButton(closeButton);
 
54
        closeButton.addActionListener(new ActionListener() {
 
55
            public void actionPerformed(ActionEvent arg0) {
 
56
                setVisible(false);
 
57
                dispose();
 
58
            }
 
59
        });
 
60
        buttonPanel.add(closeButton);
 
61
        
 
62
        cont.add(buttonPanel,BorderLayout.SOUTH);
 
63
        
 
64
        setSize(650,200);
 
65
        setLocationRelativeTo(a);
 
66
        setResizable(false);
 
67
        setVisible(true);
 
68
    }
 
69
    
 
70
}