git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ac2464
)
JAL-3608 JAL-3416 Added a 'gtk' option. Not currently used unless specified as -Dlaf=gtk
author
soares
<bsoares@dundee.ac.uk>
Thu, 23 Apr 2020 14:19:05 +0000
(15:19 +0100)
committer
soares
<bsoares@dundee.ac.uk>
Thu, 23 Apr 2020 14:19:05 +0000
(15:19 +0100)
src/jalview/bin/Jalview.java
patch
|
blob
|
history
diff --git
a/src/jalview/bin/Jalview.java
b/src/jalview/bin/Jalview.java
index
5c026fd
..
cfcc2f7
100755
(executable)
--- a/
src/jalview/bin/Jalview.java
+++ b/
src/jalview/bin/Jalview.java
@@
-367,7
+367,7
@@
public class Jalview
desktop = null;
desktop = null;
- // property laf = "crossplatform", "system" or "mac"
+ // property laf = "crossplatform", "system", "gtk" or "mac"
// If not set (or chosen laf fails), use the normal SystemLaF and if on Mac,
// try Quaqua/Vaqua.
String laf = System.getProperty("laf", "none");
// If not set (or chosen laf fails), use the normal SystemLaF and if on Mac,
// try Quaqua/Vaqua.
String laf = System.getProperty("laf", "none");
@@
-388,6
+388,12
@@
public class Jalview
System.err.println("Could not set requested laf=" + laf);
}
break;
System.err.println("Could not set requested laf=" + laf);
}
break;
+ case "gtk":
+ lafSet = setGtkLookAndFeel();
+ {
+ System.err.println("Could not set requested laf=" + laf);
+ }
+ break;
case "mac":
lafSet = setMacLookAndFeel();
if (!lafSet)
case "mac":
lafSet = setMacLookAndFeel();
if (!lafSet)
@@
-878,6
+884,22
@@
public class Jalview
return set;
}
return set;
}
+ private static boolean setGtkLookAndFeel()
+ {
+ boolean set = false;
+ String laf = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
+ try
+ {
+ UIManager.setLookAndFeel(laf);
+ set = true;
+ } catch (Exception ex)
+ {
+ System.err.println("Unexpected Look and Feel Exception");
+ ex.printStackTrace();
+ }
+ return set;
+ }
+
private static boolean setMacLookAndFeel()
{
boolean set = false;
private static boolean setMacLookAndFeel()
{
boolean set = false;