Java Utililty Methods Swing Look and Feel

List of utility methods to do Swing Look and Feel

Description

The list of methods to do Swing Look and Feel are organized into topic(s).

Method

booleanisDarkLAF()
is Dark LAF
final Color panelBack = UIManager.getColor("Panel.background");
if (panelBack == null) {
    return false;
} else {
    return calculateBrightness(panelBack) < 150;
booleanisDarkLnf()
Does the currently active l&f use a dark color scheme?
return UIManager.getLookAndFeel().getClass().getName().equals(DARCULA_LAF_CLASS);
booleanisDarkResultsBackground()
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;
booleanisDefaultLookAndFeel()
is Default Look And Feel
return UIManager.getLookAndFeel().getClass().getName().equals(UIManager.getSystemLookAndFeelClassName());
booleanisGTKLaF()
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;
booleanisGTKLookAndFeel()
Determines if current L&F is GTKLookAndFeel
return UIManager.getLookAndFeel().getID().equals("GTK"); 
booleanisGTKUI()
Check if we are using the GTK look and feel.
return GTKUI.equals(UIManager.getLookAndFeel().getClass().getName());
booleanisInstalledLookAndFeelNamed(String plafName)
is Installed Look And Feel Named
return getInstalledLookAndFeelInfoNamed(plafName) != null;
booleanisJGoodies()
is J Goodies
String lnf = UIManager.getLookAndFeel().getClass().getName();
return lnf.startsWith("com.jgoodies.looks.plastic");
booleanisJoxyActive()
Returns whether Joxy is the current look and feel.
LookAndFeel laf = UIManager.getLookAndFeel();
return laf != null && laf.getName().equals("Joxy");