1 | //////////////////////////////////////////////////////////////////////// |
---|
2 | // |
---|
3 | // This file AboutFrame.java is part of SURFEX. |
---|
4 | // |
---|
5 | //////////////////////////////////////////////////////////////////////// |
---|
6 | |
---|
7 | //////////////////////////////////////////////////////////////////////// |
---|
8 | // |
---|
9 | // SURFEX version 0.90.00 |
---|
10 | // ================= |
---|
11 | // |
---|
12 | // Saarland University at Saarbruecken, Germany |
---|
13 | // Department of Mathematics and Computer Science |
---|
14 | // |
---|
15 | // SURFEX on the web: www.surfex.AlgebraicSurface.net |
---|
16 | // |
---|
17 | // Authors: Oliver Labs (2001-2008), Stephan Holzer (2004-2005) |
---|
18 | // |
---|
19 | // Copyright (C) 2001-2008 |
---|
20 | // |
---|
21 | // |
---|
22 | // *NOTICE* |
---|
23 | // ======== |
---|
24 | // |
---|
25 | // This program is free software; you can redistribute it and/or modify it |
---|
26 | // under the terms of the GNU General Public License as published by the |
---|
27 | // Free Software Foundation ( version 3 or later of the License ). |
---|
28 | // |
---|
29 | // See LICENCE.TXT for details. |
---|
30 | // |
---|
31 | ///////////////////////////////////////////////////////////////////////// |
---|
32 | |
---|
33 | import java.awt.BorderLayout; |
---|
34 | import java.awt.Container; |
---|
35 | import java.awt.GridLayout; |
---|
36 | import java.awt.event.ActionEvent; |
---|
37 | import java.awt.event.ActionListener; |
---|
38 | import java.net.MalformedURLException; |
---|
39 | import java.net.URL; |
---|
40 | |
---|
41 | import javax.swing.ImageIcon; |
---|
42 | import javax.swing.JButton; |
---|
43 | import javax.swing.JFrame; |
---|
44 | import javax.swing.JLabel; |
---|
45 | import javax.swing.JPanel; |
---|
46 | |
---|
47 | ////////////////////////////////////////////////////////////// |
---|
48 | // |
---|
49 | // class AboutFrame |
---|
50 | // |
---|
51 | ////////////////////////////////////////////////////////////// |
---|
52 | |
---|
53 | public class AboutFrame extends JFrame { |
---|
54 | surfex surfex_; |
---|
55 | |
---|
56 | AboutFrame(surfex sx) { |
---|
57 | super("about surfex"); |
---|
58 | surfex_ = sx; |
---|
59 | // setSize(550, 210); |
---|
60 | Container cp = getContentPane(); |
---|
61 | cp.setLayout(new BorderLayout()); |
---|
62 | JPanel panel1 = new JPanel(); |
---|
63 | panel1.setLayout(new BorderLayout()); |
---|
64 | try { |
---|
65 | if ((surfex_.filePrefix).equals("")) { |
---|
66 | panel1.add(new JLabel(new ImageIcon("Oliver_Labs_color.jpg")), |
---|
67 | BorderLayout.CENTER); |
---|
68 | } else { |
---|
69 | panel1.add(new JLabel(new ImageIcon(new URL(surfex_.filePrefix |
---|
70 | + "Oliver_Labs_color.jpg"))), BorderLayout.CENTER); |
---|
71 | } |
---|
72 | } catch (MalformedURLException e) { |
---|
73 | System.out.println(e.toString()); |
---|
74 | } |
---|
75 | // panel1.add(new JLabel("Oliver Labs"), BorderLayout.SOUTH); |
---|
76 | panel1.add(new JLabel(" ")); |
---|
77 | |
---|
78 | JPanel panel2 = new JPanel(); |
---|
79 | panel2.setLayout(new BorderLayout()); |
---|
80 | try { |
---|
81 | if ((surfex_.filePrefix).equals("")) { |
---|
82 | panel2.add(new JLabel(new ImageIcon("Oliver_Labs_color.jpg")), |
---|
83 | BorderLayout.CENTER); |
---|
84 | } else { |
---|
85 | panel2.add(new JLabel(new ImageIcon(new URL(surfex_.filePrefix |
---|
86 | + "Oliver_Labs_color.jpg"))), BorderLayout.CENTER); |
---|
87 | } |
---|
88 | } catch (MalformedURLException e) { |
---|
89 | System.out.println(e.toString()); |
---|
90 | } |
---|
91 | // panel2.add(new JLabel("Stephan Holzer"), BorderLayout.SOUTH); |
---|
92 | panel2.add(new JLabel(" ")); |
---|
93 | |
---|
94 | JPanel panel3 = new JPanel(); |
---|
95 | panel3.setLayout(new GridLayout(13, 1)); |
---|
96 | panel3.add(new JLabel("")); |
---|
97 | panel3.add(new JLabel("Surfex v" + surfex_.strVersion + " " |
---|
98 | + surfex_.strDate)); |
---|
99 | panel3.add(new JLabel("")); |
---|
100 | panel3.add(new JLabel("http://www.surfex.AlgebraicSurface.net")); |
---|
101 | panel3.add(new JLabel("")); |
---|
102 | panel3.add(new JLabel( |
---|
103 | "Programming and Design by: Stephan Holzer and Oliver Labs")); |
---|
104 | panel3.add(new JLabel("")); |
---|
105 | panel3.add(new JLabel("Johannes Gutenberg Universitaet (Mainz, Germany)")); |
---|
106 | panel3.add(new JLabel("and Universitaet des Saarlandes (Saarbruecken, Germany)")); |
---|
107 | panel3.add(new JLabel("")); |
---|
108 | panel3.add(new JLabel("Based on Code by Oliver Labs and Richard Morris")); |
---|
109 | panel3.add(new JLabel("")); |
---|
110 | |
---|
111 | JButton OKButton = new JButton(" OK "); |
---|
112 | OKButton.addActionListener(new ActionListener() { |
---|
113 | public void actionPerformed(ActionEvent evt) { |
---|
114 | setVisible(false); |
---|
115 | } |
---|
116 | }); |
---|
117 | |
---|
118 | cp.add(panel3, BorderLayout.CENTER); |
---|
119 | cp.add(panel1, BorderLayout.WEST); |
---|
120 | cp.add(panel2, BorderLayout.EAST); |
---|
121 | cp.add(OKButton, BorderLayout.SOUTH); |
---|
122 | // setLocation(70, 200); |
---|
123 | pack(); |
---|
124 | setVisible(true); |
---|
125 | repaint(); |
---|
126 | } |
---|
127 | } // end class AboutFrame |
---|
128 | |
---|