X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=a992ace61eb47ad36861f2169676dbdcba8777c2;hb=7692386ccfe778075dd83a753d30a7a27fe507be;hp=9ec00334946c525298817e219ff2d9a2ef399777;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git
diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java
index 9ec0033..a992ace 100755
--- a/src/jalview/bin/Jalview.java
+++ b/src/jalview/bin/Jalview.java
@@ -20,9 +20,6 @@
*/
package jalview.bin;
-import groovy.lang.Binding;
-import groovy.util.GroovyScriptEngine;
-
import jalview.ext.so.SequenceOntology;
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
@@ -64,8 +61,12 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Vector;
+import javax.swing.LookAndFeel;
import javax.swing.UIManager;
+import groovy.lang.Binding;
+import groovy.util.GroovyScriptEngine;
+
/**
* Main class for Jalview Application
*
@@ -148,7 +149,6 @@ public class Jalview
af.setProgressBar(MessageManager
.getString("status.das_features_being_retrived"), id);
af.featureSettings_actionPerformed(null);
- af.featureSettings.fetchDasFeatures(dasSources, true);
af.setProgressBar(null, id);
synchronized (us)
{
@@ -175,6 +175,8 @@ public class Jalview
*
* @param args
* open filename
+ * @throws InterruptedException
+ * @throws IOException
*/
public static void main(String[] args)
{
@@ -184,6 +186,8 @@ public class Jalview
/**
* @param args
+ * @throws InterruptedException
+ * @throws IOException
*/
void doMain(String[] args)
{
@@ -275,20 +279,43 @@ public class Jalview
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex)
{
+ System.err.println("Unexpected Look and Feel Exception");
+ ex.printStackTrace();
}
if (Platform.isAMac())
{
+
+ LookAndFeel lookAndFeel = ch.randelshofer.quaqua.QuaquaManager
+ .getLookAndFeel();
System.setProperty("com.apple.mrj.application.apple.menu.about.name",
"Jalview");
System.setProperty("apple.laf.useScreenMenuBar", "true");
- try
+ if (lookAndFeel != null)
{
- UIManager.setLookAndFeel(
- ch.randelshofer.quaqua.QuaquaManager.getLookAndFeel());
- } catch (Throwable e)
+ try
+ {
+ UIManager.setLookAndFeel(lookAndFeel);
+ } catch (Throwable e)
+ {
+ System.err.println(
+ "Failed to set QuaQua look and feel: " + e.toString());
+ }
+ }
+ if (lookAndFeel == null || !(lookAndFeel.getClass()
+ .isAssignableFrom(UIManager.getLookAndFeel().getClass()))
+ || !UIManager.getLookAndFeel().getClass().toString()
+ .toLowerCase().contains("quaqua"))
{
- System.err.println(
- "Failed to set QuaQua look and feel: " + e.toString());
+ try
+ {
+ System.err.println(
+ "Quaqua LaF not available on this plaform. Using VAqua(4).\nSee https://issues.jalview.org/browse/JAL-2976");
+ UIManager.setLookAndFeel("org.violetlib.aqua.AquaLookAndFeel");
+ } catch (Throwable e)
+ {
+ System.err.println(
+ "Failed to reset look and feel: " + e.toString());
+ }
}
}
@@ -970,7 +997,7 @@ public class Jalview
}
try
{
- Map vbinding = new HashMap();
+ Map vbinding = new HashMap<>();
vbinding.put("Jalview", this);
if (af != null)
{
@@ -1036,7 +1063,7 @@ public class Jalview
+ nickname + "|" + url);
if (source == null)
{
- source = new Vector();
+ source = new Vector<>();
}
source.addElement(nickname);
}
@@ -1054,7 +1081,7 @@ public class Jalview
System.out.println("adding source '" + data + "'");
if (source == null)
{
- source = new Vector();
+ source = new Vector<>();
}
source.addElement(data);
}