1 | /* |
---|
2 | * Jeti, a Java Jabber client, Copyright (C) 2001 E.S. de Boer |
---|
3 | * |
---|
4 | * This program is free software; you can redistribute it and/or modify |
---|
5 | * it under the terms of the GNU General Public License as published by |
---|
6 | * the Free Software Foundation; either version 2 of the License, or |
---|
7 | * (at your option) any later version. |
---|
8 | * |
---|
9 | * This program is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | * GNU General Public License for more details. |
---|
13 | * |
---|
14 | * You should have received a copy of the GNU General Public License |
---|
15 | * along with this program; if not, write to the Free Software |
---|
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
17 | * |
---|
18 | * For questions, comments etc, |
---|
19 | * use the website at http://jeti.jabberstudio.org |
---|
20 | * or mail/IM me at jeti@jabber.org |
---|
21 | */ |
---|
22 | |
---|
23 | package nu.fw.jeti.ui; |
---|
24 | |
---|
25 | |
---|
26 | import java.awt.SystemColor; |
---|
27 | import java.awt.event.ActionEvent; |
---|
28 | |
---|
29 | import javax.swing.*; |
---|
30 | |
---|
31 | import nu.fw.jeti.backend.Start; |
---|
32 | import nu.fw.jeti.plugins.PluginsInfo; |
---|
33 | import nu.fw.jeti.util.I18N; |
---|
34 | |
---|
35 | /*2001 |
---|
36 | * @author E.S. de Boer |
---|
37 | * @version 1.0 |
---|
38 | */ |
---|
39 | |
---|
40 | public class AboutWindow extends JFrame |
---|
41 | { |
---|
42 | public AboutWindow() |
---|
43 | { |
---|
44 | try |
---|
45 | { |
---|
46 | jbInit(); |
---|
47 | } |
---|
48 | catch(Exception e) |
---|
49 | { |
---|
50 | e.printStackTrace(); |
---|
51 | } |
---|
52 | } |
---|
53 | private void jbInit() throws Exception |
---|
54 | { |
---|
55 | setTitle(I18N.gettext("main.about.About_JETI")); |
---|
56 | setDefaultCloseOperation(DISPOSE_ON_CLOSE); |
---|
57 | getContentPane().setLayout(new BoxLayout(getContentPane(),BoxLayout.Y_AXIS)); |
---|
58 | |
---|
59 | // Title |
---|
60 | JLabel label = new JLabel("JETI"+Start.OS2); |
---|
61 | label.setFont(new java.awt.Font("Serif", 1, 35)); |
---|
62 | label.setAlignmentX((float) 0.5); |
---|
63 | getContentPane().add(label); |
---|
64 | |
---|
65 | // Version |
---|
66 | label = new JLabel(I18N.gettext("main.about.Version") + " " + Start.VERSION); |
---|
67 | label.setAlignmentX((float) 0.5); |
---|
68 | getContentPane().add(label); |
---|
69 | |
---|
70 | label = new JLabel("http://www.jeti-im.org"); |
---|
71 | label.setAlignmentX(0.5f); |
---|
72 | getContentPane().add(label); |
---|
73 | |
---|
74 | label = new JLabel(" "); |
---|
75 | label.setAlignmentX(0.5f); |
---|
76 | getContentPane().add(label); |
---|
77 | |
---|
78 | label = new JLabel(".:: Customizado por CELEPAR ::."); |
---|
79 | label.setFont(new java.awt.Font("Serif",1,15)); |
---|
80 | label.setAlignmentX(0.5f); |
---|
81 | getContentPane().add(label); |
---|
82 | |
---|
83 | label = new JLabel("Cia de Inform\u00E1tica do Paran\u00E1"); |
---|
84 | label.setFont(new java.awt.Font("Serif",1,10)); |
---|
85 | label.setAlignmentX(0.5f); |
---|
86 | getContentPane().add(label); |
---|
87 | |
---|
88 | JTextPane textPane = new JTextPane(); |
---|
89 | textPane.setBackground(SystemColor.control); |
---|
90 | textPane.setEnabled(false); |
---|
91 | textPane.setFont(new java.awt.Font("Dialog", 1, 12)); |
---|
92 | textPane.setOpaque(false); |
---|
93 | textPane.setEditable(false); |
---|
94 | textPane.setText(PluginsInfo.getAbout()); |
---|
95 | textPane.setCaretPosition(0); |
---|
96 | JScrollPane scrollPane = new JScrollPane(textPane); |
---|
97 | scrollPane.setBorder(null); |
---|
98 | getContentPane().add(scrollPane); |
---|
99 | |
---|
100 | JButton button = new JButton(); |
---|
101 | button.setAlignmentX((float) 0.5); |
---|
102 | I18N.setTextAndMnemonic("Close",button); |
---|
103 | button.addActionListener(new java.awt.event.ActionListener() |
---|
104 | { |
---|
105 | public void actionPerformed(ActionEvent e) |
---|
106 | { |
---|
107 | jButton1_actionPerformed(e); |
---|
108 | } |
---|
109 | }); |
---|
110 | getRootPane().setDefaultButton(button); |
---|
111 | getContentPane().add(button); |
---|
112 | setSize(300,250); |
---|
113 | setLocationRelativeTo(null); |
---|
114 | } |
---|
115 | |
---|
116 | void jButton1_actionPerformed(ActionEvent e) |
---|
117 | { |
---|
118 | this.dispose(); |
---|
119 | } |
---|
120 | } |
---|
121 | /* |
---|
122 | * Overrides for emacs |
---|
123 | * Local variables: |
---|
124 | * tab-width: 4 |
---|
125 | * End: |
---|
126 | */ |
---|