").append("
Version: ")
+ .append(Cache.getProperty("VERSION")).append("
").append("
Built: ")
+ .append(Cache.getDefault("BUILD_DATE", "unknown")).append(" from ")
+ .append(Cache.getBuildDetailsForSplash()).append("");
String latestVersion = Cache.getDefault("LATEST_VERSION", "Checking");
- if (latestVersion.equals("Checking"))
- {
+ if (latestVersion.equals("Checking")) {
// JBP removed this message for 2.11: May be reinstated in future version
// message.append("
...Checking latest version...");
- }
- else if (!latestVersion.equals(Cache.getProperty("VERSION")))
- {
+ } else if (!latestVersion.equals(Cache.getProperty("VERSION"))) {
boolean red = false;
- if (Cache.getProperty("VERSION").toLowerCase()
- .indexOf("automated build") == -1)
- {
+ if (Cache.getProperty("VERSION").toLowerCase(Locale.ROOT).indexOf("automated build") == -1) {
red = true;
// Displayed when code version and jnlp version do not match and code
// version is not a development build
message.append("
");
}
- message.append("
!! Version ")
- .append(Cache.getDefault("LATEST_VERSION", "..Checking.."))
- .append(" is available for download from ")
- .append(Cache.getDefault("www.jalview.org",
- "http://www.jalview.org"))
- .append(" !!");
- if (red)
- {
+ message.append("
!! Version ").append(Cache.getDefault("LATEST_VERSION", "..Checking.."))
+ .append(" is available for download from ")
+ .append(Cache.getDefault("www.jalview.org", "https://www.jalview.org")).append(" !!");
+ if (red) {
message.append("
");
}
}
@@ -1471,6 +1460,8 @@ public class Desktop extends GDesktop
message.append(Cache.getDefault("AUTHORFNAMES", DEFAULT_AUTHORS));
message.append(CITATION);
+ message.append("
");
+
return message.toString();
}
@@ -1478,15 +1469,11 @@ public class Desktop extends GDesktop
* Action on requesting Help documentation
*/
@Override
- public void documentationMenuItem_actionPerformed()
- {
- try
- {
- if (Platform.isJS())
- {
- BrowserLauncher.openURL("http://www.jalview.org/help.html");
- }
- else
+ public void documentationMenuItem_actionPerformed() {
+ try {
+ if (Platform.isJS()) {
+ BrowserLauncher.openURL("https://www.jalview.org/help.html");
+ } else
/**
* Java only
*
@@ -1495,8 +1482,7 @@ public class Desktop extends GDesktop
{
Help.showHelpWindow();
}
- } catch (Exception ex)
- {
+ } catch (Exception ex) {
System.err.println("Error opening help: " + ex.getMessage());
}
}
@@ -1557,9 +1543,9 @@ public class Desktop extends GDesktop
protected void garbageCollect_actionPerformed(ActionEvent e)
{
// We simply collect the garbage
- Cache.log.debug("Collecting garbage...");
+ jalview.bin.Console.debug("Collecting garbage...");
System.gc();
- Cache.log.debug("Finished garbage collection.");
+ jalview.bin.Console.debug("Finished garbage collection.");
}
/*
@@ -1692,9 +1678,8 @@ public class Desktop extends GDesktop
* DOCUMENT ME!
*/
@Override
- protected void preferences_actionPerformed(ActionEvent e)
- {
- new Preferences();
+ protected void preferences_actionPerformed(ActionEvent e) {
+ Preferences.openPreferences();
}
/**
@@ -1737,8 +1722,7 @@ public class Desktop extends GDesktop
}
}
- if (approveSave || autoSave)
- {
+ if (approveSave || autoSave) {
final Desktop me = this;
final java.io.File chosenFile = projectFile;
new Thread(new Runnable()
@@ -1773,7 +1757,7 @@ public class Desktop extends GDesktop
+ chosenFile.getName(), oom);
} catch (Exception ex)
{
- Cache.log.error("Problems whilst trying to save to "
+ jalview.bin.Console.error("Problems whilst trying to save to "
+ chosenFile.getName(), ex);
JvOptionPane.showMessageDialog(me,
MessageManager.formatMessage(
@@ -1845,7 +1829,7 @@ public class Desktop extends GDesktop
new OOMWarning("Whilst loading project from " + choice, oom);
} catch (Exception ex)
{
- Cache.log.error(
+ jalview.bin.Console.error(
"Problems whilst loading project from " + choice, ex);
JvOptionPane.showMessageDialog(getDesktopPane(),
MessageManager.formatMessage(
@@ -1857,7 +1841,7 @@ public class Desktop extends GDesktop
JvOptionPane.WARNING_MESSAGE);
}
}
- }).start();
+ }, "Project Loader").start();
}
});
@@ -2159,6 +2143,7 @@ public class Desktop extends GDesktop
{
source.showFeatureSettingsUI();
}
+
}
public JInternalFrame[] getAllFrames()
@@ -2352,6 +2337,9 @@ public class Desktop extends GDesktop
10, getHeight() - fm.getHeight());
}
}
+
+ // output debug scale message. Important for jalview.bin.HiDPISettingTest2
+ Desktop.debugScaleMessage(Desktop.getDesktopPane().getGraphics());
}
}
@@ -2447,7 +2435,7 @@ public class Desktop extends GDesktop
openGroovyConsole();
} catch (Exception ex)
{
- Cache.log.error("Groovy Shell Creation failed.", ex);
+ jalview.bin.Console.error("Groovy Shell Creation failed.", ex);
JvOptionPane.showInternalMessageDialog(desktopPane,
MessageManager.getString("label.couldnt_create_groovy_shell"),
@@ -2584,6 +2572,13 @@ public class Desktop extends GDesktop
}
@Override
+ public void addProgressBar(long id, String message)
+ {
+ // TODO
+ throw new UnsupportedOperationException("not implemented");
+ }
+
+ @Override
public void removeProgressBar(long id)
{
//TODO
@@ -2701,14 +2696,23 @@ public class Desktop extends GDesktop
this.inBatchMode = inBatchMode;
}
+ /**
+ * start service discovery and wait till it is done
+ */
public void startServiceDiscovery()
{
startServiceDiscovery(false);
}
+ /**
+ * start service discovery threads - blocking or non-blocking
+ *
+ * @param blocking
+ */
public void startServiceDiscovery(boolean blocking)
{
- System.out.println("Starting service discovery");
+ jalview.bin.Console.debug("Starting service discovery");
+
var tasks = new ArrayList