// first row : freeplane
c.gridy = 1;
final JLabel freeplaneLabel = new JLabel("Freeplane");
final FreeplaneVersion freeplaneLocalVersion = FreeplaneVersion.getVersion();
final JLabel freeplaneInstalledVersionLabel = new JLabel(freeplaneLocalVersion.toString(), SwingConstants.CENTER);
final JLabel freeplaneLatestVersionLabel;
JButton updateButton;
JButton changelogButton;
final Locale defaultLocale = Locale.getDefault();
final String language = defaultLocale.getLanguage();
final String translatedWebUpdate = getWebUpdateUrl(language);
changelogButton = new JButton(TextUtils.getText("updater.viewChangelog"));
changelogButton.addActionListener(openUrlListener);
changelogButton.setActionCommand(translatedWebUpdate);
updateButton = new JButton(TextUtils.getText("updater.goToDownload"));
updateButton.addActionListener(openUrlListener);
updateButton.setActionCommand("http://freeplane.sourceforge.net");
Boolean needsUpdate = Boolean.FALSE;
if (freeplaneLatestVersion != null) {
if (freeplaneLocalVersion.compareTo(freeplaneLatestVersion) < 0) {
needsUpdate = Boolean.TRUE;
} else {
needsUpdate = Boolean.FALSE;
}
freeplaneLatestVersionLabel = new JLabel(freeplaneLatestVersion.toString(), SwingConstants.CENTER);
} else {
freeplaneLatestVersionLabel = new JLabel(TextUtils.getText("updater.version.unknown"), SwingConstants.CENTER);
freeplaneLatestVersionLabel.setToolTipText(TextUtils.getText(info));
}
changelogButton.setEnabled(needsUpdate);
updateButton.setEnabled(needsUpdate);
c.gridx = 0;
gridPane.add(freeplaneLabel, c);
c.gridx = 1;
gridPane.add(freeplaneInstalledVersionLabel, c);
c.gridx = 2;
gridPane.add(freeplaneLatestVersionLabel, c);
c.gridx = 3;
gridPane.add(changelogButton, c);
c.gridx = 4;
gridPane.add(updateButton, c);
final List<AddOnProperties> installedAddOns = AddOnsController.getController().getInstalledAddOns();
gridRow = 3;
for (AddOnProperties addOnProperties : installedAddOns) {
FreeplaneVersion addOnLocalVersion = toFreeplaneVersion(addOnProperties.getVersion());
FreeplaneVersion addOnLatestVersion = toFreeplaneVersion(addOnProperties.getLatestVersion());
final JLabel addOnInstalledVersionLabel = new JLabel(addOnLocalVersion.toString(), SwingConstants.CENTER);
final JLabel addOnLatestVersionLabel;
needsUpdate = Boolean.FALSE;
if (addOnLatestVersion != null) {
if (addOnLocalVersion.compareTo(addOnLatestVersion) < 0) {
needsUpdate = Boolean.TRUE;
}
addOnLatestVersionLabel = new JLabel(addOnLatestVersion.toString(), SwingConstants.CENTER);
} else {
addOnLatestVersionLabel = new JLabel(TextUtils.getText("updater.version.unknown"), SwingConstants.CENTER);
if (addOnProperties.getUpdateUrl() != null) {
addOnLatestVersionLabel.setToolTipText(TextUtils.getText("updater.version.unreachable") + " " + addOnProperties.getUpdateUrl());
} else {