import java.util.Map;
import java.util.Vector;
+import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import groovy.lang.Binding;
}
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
- {
- UIManager.setLookAndFeel(
- ch.randelshofer.quaqua.QuaquaManager.getLookAndFeel());
- } catch (Throwable e)
+ if (lookAndFeel != null)
{
- System.err.println(
- "Failed to set QuaQua look and feel: " + e.toString());
+ try
+ {
+ UIManager.setLookAndFeel(lookAndFeel);
+ } catch (Throwable e)
+ {
+ System.err.println(
+ "Failed to set QuaQua look and feel: " + e.toString());
+ }
}
- if (!ch.randelshofer.quaqua.QuaquaManager.getLookAndFeel()
- .equals(UIManager.getLookAndFeel()))
+ if (lookAndFeel == null || !(lookAndFeel.getClass()
+ .isAssignableFrom(UIManager.getLookAndFeel().getClass()))
+ || !UIManager.getLookAndFeel().getClass().toString()
+ .toLowerCase().contains("quaqua"))
{
try
{
System.err.println(
- "Quaqua LaF not available. Using VAqua(4).");
+ "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)
{