1 /*****************************************************/
2 /* This java file is a part of the */
4 /* - Plouf's Java IRC Client - */
6 /* Copyright (C) 2002 - 2004 Philippe Detournay */
8 /* All contacts : theplouf@yahoo.com */
10 /* PJIRC is free software; you can redistribute */
11 /* it and/or modify it under the terms of the GNU */
12 /* General Public License as published by the */
13 /* Free Software Foundation; version 2 or later of */
16 /* PJIRC is distributed in the hope that it will */
17 /* be useful, but WITHOUT ANY WARRANTY; without */
18 /* even the implied warranty of MERCHANTABILITY or */
19 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
20 /* General Public License for more details. */
22 /* You should have received a copy of the GNU */
23 /* General Public License along with PJIRC; if */
24 /* not, write to the Free Software Foundation, */
25 /* Inc., 59 Temple Place, Suite 330, Boston, */
26 /* MA 02111-1307 USA */
28 /*****************************************************/
32 import java.awt.BorderLayout;
34 import java.awt.Frame;
35 import java.awt.GridLayout;
36 import java.awt.Label;
37 import java.awt.Panel;
38 import java.awt.event.WindowAdapter;
39 import java.awt.event.WindowEvent;
44 public class AboutDialog extends WindowAdapter {
45 private Frame _aboutFrame;
48 * Open and display the about dialog, using the given IRCConfiguration.
51 * the IRCConfiguration.
53 public AboutDialog(IRCConfiguration config) {
54 displayAboutPage(config);
57 private Label createLabel(String text) {
58 Label b = new Label(text, Label.CENTER);
59 b.setFont(new Font("", Font.PLAIN, 12));
63 private void displayAboutPage(IRCConfiguration config) {
64 if (_aboutFrame != null)
66 _aboutFrame = new Frame();
67 _aboutFrame.setTitle(config.getText(IRCTextProvider.ABOUT_ABOUT));
68 _aboutFrame.setLayout(new BorderLayout());
69 _aboutFrame.setFont(new Font("", Font.PLAIN, 12));
71 Panel text = new Panel();
73 text.setLayout(new GridLayout(20, 1));
74 text.add(createLabel("PJIRC v" + config.getVersion()));
75 text.add(new Panel());
76 text.add(createLabel(config.getText(IRCTextProvider.ABOUT_GPL)));
77 text.add(new Panel());
78 text.add(createLabel(config.getText(IRCTextProvider.ABOUT_PROGRAMMING)
79 + " : Philippe Detournay alias Plouf (theplouf@yahoo.com)"));
80 text.add(createLabel(config.getText(IRCTextProvider.ABOUT_DESIGN)
81 + " : Raphael Seegmuller chez pixxservices.com (pixxservices@pixxservices.com)"));
82 text.add(new Panel());
83 text.add(createLabel(config.getText(IRCTextProvider.ABOUT_THANKS)));
84 text.add(new Panel());
85 text.add(createLabel("Mandragor : www.mandragor.org"));
86 text.add(createLabel("Diboo : www.diboo.net"));
87 text.add(createLabel("Kombat Falcon.be Jerarckill Red Spider"));
88 text.add(createLabel("Ezequiel Jiquera"));
89 text.add(new Panel());
90 text.add(createLabel(config.getText(IRCTextProvider.ABOUT_SUPPORT)));
91 text.add(new Panel());
92 text.add(createLabel(config.getGUIInfoString()));
93 text.add(new Panel());
94 text.add(createLabel("http://www.pjirc.com"));
95 text.add(createLabel("http://www.pjirc.it"));
96 _aboutFrame.addWindowListener(this);
97 _aboutFrame.add(text, BorderLayout.CENTER);
99 _aboutFrame.setSize(500, 300);
100 _aboutFrame.setResizable(false);
105 public void windowClosed(WindowEvent e) {
106 _aboutFrame.removeWindowListener(this);
111 public void windowClosing(WindowEvent e) {
113 _aboutFrame.dispose();