+ /**
+ * Shows a dialog with general preferences.
+ */
+ private void optionsPreferences() {
+ ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setConfigurationLocation(configuration.getConfigurationDirectory());
+ ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setHasNextToJarConfiguration(configuration.getConfigurationLocator().isValidLocation(ConfigurationLocation.NEXT_TO_JAR_FILE));
+ ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setHasCustomConfiguration(configuration.getConfigurationLocator().isValidLocation(ConfigurationLocation.CUSTOM));
+ showPage(PageType.PAGE_PREFERENCES);
+ optionsPreferencesAction.setEnabled(false);
+ wizard.setNextEnabled(true);
+ wizard.setNextName(I18n.getMessage("jsite.wizard.next"));
+ }
+
+ /**
+ * Shows a dialog box that shows the last version that was found by the
+ * {@link UpdateChecker}.
+ */
+ private void showLatestUpdate() {
+ Version latestVersion = updateChecker.getLatestVersion();
+ int versionDifference = latestVersion.compareTo(VERSION);
+ if (versionDifference > 0) {
+ JOptionPane.showMessageDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.update-checker.latest-version.newer.message"), VERSION, latestVersion), I18n.getMessage("jsite.update-checker.latest-version.title"), JOptionPane.INFORMATION_MESSAGE);
+ } else if (versionDifference < 0) {
+ JOptionPane.showMessageDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.update-checker.latest-version.older.message"), VERSION, latestVersion), I18n.getMessage("jsite.update-checker.latest-version.title"), JOptionPane.INFORMATION_MESSAGE);
+ } else {
+ JOptionPane.showMessageDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.update-checker.latest-version.okay.message"), VERSION, latestVersion), I18n.getMessage("jsite.update-checker.latest-version.title"), JOptionPane.INFORMATION_MESSAGE);
+ }
+ }
+