diff options
Diffstat (limited to 'enigma-swing/src/main/java')
| -rw-r--r-- | enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java index 1c70d439..d1d3e0df 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java | |||
| @@ -8,16 +8,18 @@ import javax.swing.JPanel; | |||
| 8 | import javax.swing.UIManager; | 8 | import javax.swing.UIManager; |
| 9 | import javax.swing.plaf.metal.MetalLookAndFeel; | 9 | import javax.swing.plaf.metal.MetalLookAndFeel; |
| 10 | 10 | ||
| 11 | import com.bulenkov.darcula.DarculaLaf; | 11 | import com.formdev.flatlaf.FlatDarculaLaf; |
| 12 | import com.formdev.flatlaf.FlatLightLaf; | ||
| 12 | 13 | ||
| 13 | public enum LookAndFeel { | 14 | public enum LookAndFeel { |
| 14 | DEFAULT("Default"), | 15 | DEFAULT("Default"), |
| 15 | DARCULA("Darcula"), | 16 | DARCULA("Darcula"), |
| 17 | METAL("Metal"), | ||
| 16 | SYSTEM("System"), | 18 | SYSTEM("System"), |
| 17 | NONE("None (JVM default)"); | 19 | NONE("None (JVM default)"); |
| 18 | 20 | ||
| 19 | // the "JVM default" look and feel, get it at the beginning and store it so we can set it later | 21 | // the "JVM default" look and feel, get it at the beginning and store it so we can set it later |
| 20 | private static javax.swing.LookAndFeel NONE_LAF = UIManager.getLookAndFeel(); | 22 | private static final javax.swing.LookAndFeel NONE_LAF = UIManager.getLookAndFeel(); |
| 21 | private final String name; | 23 | private final String name; |
| 22 | 24 | ||
| 23 | LookAndFeel(String name) { | 25 | LookAndFeel(String name) { |
| @@ -35,10 +37,13 @@ public enum LookAndFeel { | |||
| 35 | UIManager.setLookAndFeel(NONE_LAF); | 37 | UIManager.setLookAndFeel(NONE_LAF); |
| 36 | break; | 38 | break; |
| 37 | case DEFAULT: | 39 | case DEFAULT: |
| 40 | UIManager.setLookAndFeel(new FlatLightLaf()); | ||
| 41 | break; | ||
| 42 | case METAL: | ||
| 38 | UIManager.setLookAndFeel(new MetalLookAndFeel()); | 43 | UIManager.setLookAndFeel(new MetalLookAndFeel()); |
| 39 | break; | 44 | break; |
| 40 | case DARCULA: | 45 | case DARCULA: |
| 41 | UIManager.setLookAndFeel(new DarculaLaf()); | 46 | UIManager.setLookAndFeel(new FlatDarculaLaf()); |
| 42 | break; | 47 | break; |
| 43 | case SYSTEM: | 48 | case SYSTEM: |
| 44 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | 49 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |