From e5edc7b4b0747829023136d8766d7e06ed1e56aa Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 8 Jul 2020 00:47:55 +0100 Subject: [PATCH] JAL-3608 Changes from code review CR-JAL-236 Conflicts: src/jalview/bin/Jalview.java --- src/jalview/bin/Jalview.java | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 35b21df..e2c9c1b 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -817,27 +817,22 @@ public class Jalview private static boolean setCrossPlatformLookAndFeel() { - boolean set = false; - try - { - UIManager.setLookAndFeel( - UIManager.getCrossPlatformLookAndFeelClassName()); - set = true; - } catch (Exception ex) - { - Cache.log.error("Unexpected Look and Feel Exception"); - Cache.log.error(ex.getMessage()); - Cache.log.debug(Cache.getStackTraceString(ex)); - } - return set; + return setGenericLookAndFeel(false); } private static boolean setSystemLookAndFeel() { + return setGenericLookAndFeel(true); + } + + private static boolean setGenericLookAndFeel(boolean system) + { boolean set = false; try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + UIManager.setLookAndFeel( + system ? UIManager.getSystemLookAndFeelClassName() + : UIManager.getCrossPlatformLookAndFeelClassName()); set = true; } catch (Exception ex) { -- 1.7.10.2