X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FAboutScreen.java;fp=tim%2Fprune%2Fgui%2FAboutScreen.java;h=0f20ba00778064254a86ddbf2a1d0681f5d1aeb2;hp=0d1ef5b7f3bd5cc4fb5c75f8210baf59c2922284;hb=54b9d8bc8f0025ccf97a67d9dd217ef1f9cf082f;hpb=52bf9e8686c916be37a26a0b75340393d4478b05 diff --git a/tim/prune/gui/AboutScreen.java b/tim/prune/function/AboutScreen.java similarity index 74% rename from tim/prune/gui/AboutScreen.java rename to tim/prune/function/AboutScreen.java index 0d1ef5b..0f20ba0 100644 --- a/tim/prune/gui/AboutScreen.java +++ b/tim/prune/function/AboutScreen.java @@ -1,4 +1,4 @@ -package tim.prune.gui; +package tim.prune.function; import java.awt.BorderLayout; import java.awt.Component; @@ -18,14 +18,15 @@ import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JEditorPane; -import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; +import tim.prune.App; import tim.prune.ExternalTools; +import tim.prune.GenericFunction; import tim.prune.GpsPruner; import tim.prune.I18nManager; import tim.prune.threedee.WindowFactory; @@ -33,20 +34,31 @@ import tim.prune.threedee.WindowFactory; /** * Class to represent the "About" popup window */ -public class AboutScreen extends JDialog +public class AboutScreen extends GenericFunction { - JButton _okButton = null; + private JDialog _dialog = null; + private JTabbedPane _tabs = null; + private JButton _okButton = null; + /** Labels for whether tools installed or not */ + private JLabel[] _installedLabels = null; + /** * Constructor - * @param inParent parent frame + * @param inApp app object */ - public AboutScreen(JFrame inParent) + public AboutScreen(App inApp) { - super(inParent, I18nManager.getText("dialog.about.title")); - getContentPane().add(makeContents()); + super(inApp); } + /** + * Return the name key for this function + */ + public String getNameKey() + { + return "function.about"; + } /** * @return the contents of the window as a Component @@ -56,8 +68,8 @@ public class AboutScreen extends JDialog JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); - JTabbedPane tabPane = new JTabbedPane(); - mainPanel.add(tabPane, BorderLayout.CENTER); + _tabs = new JTabbedPane(); + mainPanel.add(_tabs, BorderLayout.CENTER); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new BoxLayout(aboutPanel, BoxLayout.Y_AXIS)); @@ -78,7 +90,8 @@ public class AboutScreen extends JDialog descBuffer.append("

").append(I18nManager.getText("dialog.about.summarytext2")).append("

"); descBuffer.append("

").append(I18nManager.getText("dialog.about.summarytext3")).append("

"); descBuffer.append("

").append(I18nManager.getText("dialog.about.languages")).append(" : ") - .append("deutsch, english, español, français, italiano, polski, schwiizerdüütsch").append("

"); + .append("deutsch, english, español, français, italiano, polski,
" + + "schwiizerdüütsch, português, bahasa indonesia, română").append("

"); descBuffer.append("

").append(I18nManager.getText("dialog.about.translatedby")).append("

"); JEditorPane descPane = new JEditorPane("text/html", descBuffer.toString()); descPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); @@ -88,7 +101,7 @@ public class AboutScreen extends JDialog aboutPanel.add(descPane); aboutPanel.add(new JLabel(" ")); - tabPane.add(I18nManager.getText("dialog.about.title"), aboutPanel); + _tabs.add(I18nManager.getText("function.about"), aboutPanel); // Second pane for system info JPanel sysInfoPanel = new JPanel(); @@ -108,31 +121,33 @@ public class AboutScreen extends JDialog addToGridBagPanel(sysInfoPanel, gridBag, constraints, new JLabel(System.getProperty("java.runtime.version")), 1, 1); + // Create install labels to be populated later + final int NUM_INSTALL_CHECKS = 5; + _installedLabels = new JLabel[NUM_INSTALL_CHECKS]; + for (int i=0; i