Mercurial > hg > release > thermostat-1.0
changeset 368:48431d04e664
Honor laf
review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-June/001807.html
reviewed-by: omajid
author | Mario Torre <neugens.limasoftware@gmail.com> |
---|---|
date | Tue, 12 Jun 2012 21:26:04 +0200 |
parents | 5b8da5a49f21 |
children | 912f1f0e5e09 |
files | client/core/src/main/java/com/redhat/thermostat/client/internal/Main.java |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/client/core/src/main/java/com/redhat/thermostat/client/internal/Main.java Tue Jun 12 21:26:04 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/internal/Main.java Tue Jun 12 21:26:04 2012 +0200 @@ -103,10 +103,15 @@ @Override public void run() { - try { - UIManager.setLookAndFeel(new DolphinLookAndFeel()); - } catch (UnsupportedLookAndFeelException e) { - logger.log(Level.WARNING, "cannot use DolphinLookAndFeel"); + // check if the user has other preferences... + // not that there is any reason! + String laf = System.getProperty("swing.defaultlaf"); + if (laf == null) { + try { + UIManager.setLookAndFeel(new DolphinLookAndFeel()); + } catch (UnsupportedLookAndFeelException e) { + logger.log(Level.WARNING, "cannot use DolphinLookAndFeel"); + } } showGui();