List of utility methods to do Swing Look and Feel
boolean | isDarkLAF() is Dark LAF final Color panelBack = UIManager.getColor("Panel.background"); if (panelBack == null) { return false; } else { return calculateBrightness(panelBack) < 150; |
boolean | isDarkLnf() Does the currently active l&f use a dark color scheme? return UIManager.getLookAndFeel().getClass().getName().equals(DARCULA_LAF_CLASS);
|
boolean | isDarkResultsBackground() is Dark Results Background if (darkResultsBackground == null) { Color c = getProfilerResultsBackground(); int b = (int) (0.3 * c.getRed() + 0.59 * c.getGreen() + 0.11 * c.getBlue()); darkResultsBackground = b < 85; return darkResultsBackground; |
boolean | isDefaultLookAndFeel() is Default Look And Feel return UIManager.getLookAndFeel().getClass().getName().equals(UIManager.getSystemLookAndFeelClassName());
|
boolean | isGTKLaF() is GTK La F if (gtklaf == null) { try { gtklaf = Class.forName("com.sun.java.swing.plaf.gtk.GTKLookAndFeel") .isAssignableFrom(UIManager.getLookAndFeel().getClass()); } catch (Exception e) { gtklaf = Boolean.FALSE; return gtklaf; |
boolean | isGTKLookAndFeel() Determines if current L&F is GTKLookAndFeel return UIManager.getLookAndFeel().getID().equals("GTK"); |
boolean | isGTKUI() Check if we are using the GTK look and feel. return GTKUI.equals(UIManager.getLookAndFeel().getClass().getName());
|
boolean | isInstalledLookAndFeelNamed(String plafName) is Installed Look And Feel Named return getInstalledLookAndFeelInfoNamed(plafName) != null;
|
boolean | isJGoodies() is J Goodies String lnf = UIManager.getLookAndFeel().getClass().getName(); return lnf.startsWith("com.jgoodies.looks.plastic"); |
boolean | isJoxyActive() Returns whether Joxy is the current look and feel. LookAndFeel laf = UIManager.getLookAndFeel(); return laf != null && laf.getName().equals("Joxy"); |