--- /dev/null
+/*
+ * jSite2 - AboutDialog.java -
+ * Copyright © 2008 David Roden
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package net.pterodactylus.jsite.gui;
+
+import java.awt.BorderLayout;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.SwingConstants;
+
+import net.pterodactylus.jsite.i18n.I18n;
+
+/**
+ * An “about” dialog.
+ *
+ * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
+ * @version $Id$
+ */
+public class AboutDialog extends JDialog {
+
+ /** A list of all contributors. */
+ private static final List<Contributor> CONTRIBUTORS = new ArrayList<Contributor>();
+
+ static {
+ CONTRIBUTORS.add(new Contributor("David ‘Bombe’ Roden", "bombe@freenetproject.org", "Main code"));
+ }
+
+ /**
+ * Creates a new “about” dialog.
+ *
+ * @param swingInterface
+ * The Swing interface
+ */
+ public AboutDialog(SwingInterface swingInterface) {
+ super(swingInterface.getMainWindow());
+ initComponents();
+ }
+
+ //
+ // PRIVATE METHODS
+ //
+
+ /**
+ * Initiliazes all components of the dialog.
+ */
+ private void initComponents() {
+ JPanel contentPane = new JPanel(new BorderLayout(12, 12));
+ getContentPane().add(contentPane, BorderLayout.CENTER);
+ contentPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
+
+ JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
+ contentPane.add(tabbedPane, BorderLayout.CENTER);
+
+ tabbedPane.addTab(I18n.get("aboutDialog.page.about.title"), createAboutPage());
+ tabbedPane.setToolTipTextAt(0, I18n.get("aboutDialog.page.about.shortDescription"));
+ tabbedPane.addTab(I18n.get("aboutDialog.page.license.title"), createLicensePage());
+ tabbedPane.setToolTipTextAt(1, I18n.get("aboutDialog.page.license.shortDescription"));
+ }
+
+ /**
+ * Creates the “about” page.
+ *
+ * @return The “about” page
+ */
+ private JComponent createAboutPage() {
+ return new JPanel();
+ }
+
+ /**
+ * Creates the “license” page.
+ *
+ * @return The “license” page
+ */
+ private JComponent createLicensePage() {
+ return new JPanel();
+ }
+
+ /**
+ * Container for a contributor.
+ *
+ * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
+ * @version $Id$
+ */
+ private static class Contributor {
+
+ /** The name of the contributor. */
+ private final String name;
+
+ /** The email address of the contributor. */
+ private final String email;
+
+ /** The parts where the contributor helped. */
+ private final String part;
+
+ /**
+ * Creates a new contributor.
+ *
+ * @param name
+ * The name of the contributor
+ * @param email
+ * The email address of the contributor
+ * @param part
+ * The parts where the contributor helped
+ */
+ public Contributor(String name, String email, String part) {
+ this.name = name;
+ this.email = email;
+ this.part = part;
+ }
+
+ /**
+ * Returns the name of the contributor.
+ *
+ * @return The name of the contributor
+ */
+ String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the email address of the contributor.
+ *
+ * @return The email address of the contributor
+ */
+ String getEmail() {
+ return email;
+ }
+
+ /**
+ * Returns the parts where the contributor helped.
+ *
+ * @return The parts where the contributor helped
+ */
+ String getPart() {
+ return part;
+ }
+
+ }
+
+}