X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FAboutDialog.java;h=abfa166ed4ca9b35caa9142f4b03b143e6c2da4a;hb=b05d1a5dbe9d88511c5ca64af179a4df985156ff;hp=3601733113f4cda0d71152a06055b5774508f79c;hpb=aa72bfe9c0d91f7339a70218aa50824e2b321780;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/gui/AboutDialog.java b/src/net/pterodactylus/jsite/gui/AboutDialog.java index 3601733..abfa166 100644 --- a/src/net/pterodactylus/jsite/gui/AboutDialog.java +++ b/src/net/pterodactylus/jsite/gui/AboutDialog.java @@ -53,7 +53,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * An “about” dialog. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @version $Id$ */ @@ -81,9 +81,12 @@ public class AboutDialog extends JDialog implements I18nable { /** The license header. */ private I18nLabel licenseHeaderLabel; + /** The tabbed pane with all the pages. */ + private JTabbedPane pagesPane; + /** * Creates a new “about” dialog. - * + * * @param swingInterface * The Swing interface */ @@ -105,6 +108,7 @@ public class AboutDialog extends JDialog implements I18nable { */ private void initActions() { okayAction = new I18nAction("general.button.okay") { + /** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ @@ -123,13 +127,13 @@ public class AboutDialog extends JDialog implements I18nable { 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); + pagesPane = new JTabbedPane(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT); + contentPane.add(pagesPane, 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")); + pagesPane.addTab(I18n.get("aboutDialog.page.about.title"), createAboutPage()); + pagesPane.setToolTipTextAt(0, I18n.get("aboutDialog.page.about.shortDescription")); + pagesPane.addTab(I18n.get("aboutDialog.page.license.title"), createLicensePage()); + pagesPane.setToolTipTextAt(1, I18n.get("aboutDialog.page.license.shortDescription")); JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING)); contentPane.add(buttonPanel, BorderLayout.PAGE_END); @@ -138,7 +142,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates the “about” page. - * + * * @return The “about” page */ private JComponent createAboutPage() { @@ -179,7 +183,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates the “license” page. - * + * * @return The “license” page */ private JComponent createLicensePage() { @@ -201,7 +205,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Loads the license text. - * + * * @return The license text */ private String loadLicenseText() { @@ -249,12 +253,16 @@ public class AboutDialog extends JDialog implements I18nable { i18nMaintainerNameLabel.setText(I18n.get("i18n.maintainer.name") + " <" + I18n.get("i18n.maintainer.email") + ">"); okayAction.updateI18n(); setTitle(I18n.get("aboutDialog.title")); + pagesPane.setTitleAt(0, I18n.get("aboutDialog.page.about.title")); + pagesPane.setToolTipTextAt(0, I18n.get("aboutDialog.page.about.shortDescription")); + pagesPane.setTitleAt(1, I18n.get("aboutDialog.page.license.title")); + pagesPane.setToolTipTextAt(1, I18n.get("aboutDialog.page.license.shortDescription")); SwingUtils.repackCentered(this); } /** * Container for a contributor. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @version $Id$ */ @@ -271,7 +279,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates a new contributor. - * + * * @param name * The name of the contributor * @param email @@ -287,7 +295,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the name of the contributor. - * + * * @return The name of the contributor */ String getName() { @@ -296,7 +304,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the email address of the contributor. - * + * * @return The email address of the contributor */ String getEmail() { @@ -305,7 +313,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the parts where the contributor helped. - * + * * @return The parts where the contributor helped */ String getPart() {