summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
diff options
context:
space:
mode:
authorSteffen Ritter2017-06-09 12:23:27 +0200
committerSteffen Ritter2017-06-09 12:23:27 +0200
commit5363f903c3e378ebaa9e523bcc30893c1fde844c (patch)
tree2670269e1aedefad6e481b9a4fee722934292fe3 /dozentenmodul/src/main/java/org/openslx/dozmod/App.java
parent[server] Forgot to increase template version :) (diff)
downloadtutor-module-5363f903c3e378ebaa9e523bcc30893c1fde844c.tar.gz
tutor-module-5363f903c3e378ebaa9e523bcc30893c1fde844c.tar.xz
tutor-module-5363f903c3e378ebaa9e523bcc30893c1fde844c.zip
[client] Use LookAndFeel from commandline if given
E.g. java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MyApp java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel MyApp ...
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/App.java')
-rwxr-xr-x[-rw-r--r--]dozentenmodul/src/main/java/org/openslx/dozmod/App.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
index c68eaf47..772031af 100644..100755
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java
@@ -132,18 +132,21 @@ public class App {
setupLogger();
-
// Setup swing style
System.setProperty("awt.useSystemAAFontSettings", "on");
System.setProperty("swing.aatext", "true");
- try {
- UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
- } catch (Exception e1) {
+
+ if (System.getProperty("swing.defaultlaf") == null) {
try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (Exception e) {
+ UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
+ } catch (Exception e1) {
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (Exception e) {
+ }
}
}
+
// Adjust font size
adjustFontSize(Config.getFontScaling());