Java Swing Look and Feel isPlasticLaf()

Here you can find the source of isPlasticLaf()

Description

is Plastic Laf

License

Open Source License

Return

whether the current LookAndFeel is a Plastic (i.e. JGoodies) LookAndFeel

Declaration

public static boolean isPlasticLaf() 

Method Source Code

//package com.java2s;

import javax.swing.*;

public class Main {
    public static final String JGOODIES_PACKAGE = "com.jgoodies.looks";

    /** @return whether the current LookAndFeel is a Plastic (i.e. JGoodies) LookAndFeel */
    public static boolean isPlasticLaf() {
        LookAndFeel laf = UIManager.getLookAndFeel();
        return laf != null && laf.getClass().getName().startsWith(JGOODIES_PACKAGE);
    }//from   ww  w. ja  va2  s  .c o  m

    /** @return whether a given LookAndFeel name is a Plastic (i.e. JGoodies) LookAndFeel
      * @param name the fully-qualified classname of the LookAndFeel */
    public static boolean isPlasticLaf(String name) {
        return name != null && name.startsWith(JGOODIES_PACKAGE);
    }
}

Related

  1. isNimbus()
  2. isNimbus()
  3. isNimbusGTKTheme()
  4. isNimbusLookAndFeel()
  5. isNimbusLookAndFeel()
  6. isQuaqua()
  7. isSubstanceInstalled()
  8. isSynth()
  9. isSystemLookAndFeel()