/**
* An “about” dialog.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*/
/** 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
*/
*/
private void initActions() {
okayAction = new I18nAction("general.button.okay") {
+
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
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);
/**
* Creates the “about” page.
- *
+ *
* @return The “about” page
*/
private JComponent createAboutPage() {
/**
* Creates the “license” page.
- *
+ *
* @return The “license” page
*/
private JComponent createLicensePage() {
JPanel licensePanel = new JPanel(new BorderLayout(12, 12));
licensePanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
+ JPanel licenseHeaderPanel = new JPanel(new FlowLayout());
+ licensePanel.add(licenseHeaderPanel, BorderLayout.PAGE_START);
+
licenseHeaderLabel = new I18nLabel("aboutDialog.page.license.header", Version.getVersion());
- licensePanel.add(licenseHeaderLabel, BorderLayout.PAGE_START);
+ licenseHeaderPanel.add(licenseHeaderLabel);
licenseHeaderLabel.setAlignmentX(0.5f);
String licenseText = loadLicenseText();
/**
* Loads the license text.
- *
+ *
* @return The license text
*/
private String loadLicenseText() {
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$
*/
/**
* Creates a new contributor.
- *
+ *
* @param name
* The name of the contributor
* @param email
/**
* Returns the name of the contributor.
- *
+ *
* @return The name of the contributor
*/
String getName() {
/**
* Returns the email address of the contributor.
- *
+ *
* @return The email address of the contributor
*/
String getEmail() {
/**
* Returns the parts where the contributor helped.
- *
+ *
* @return The parts where the contributor helped
*/
String getPart() {