Java Swing Look and Feel checkThemeLiscense(LookAndFeelInfo i)

Here you can find the source of checkThemeLiscense(LookAndFeelInfo i)

Description

A static method for blocking the Quaqua theme from working with any OS but OSX.

License

GNU General Public License

Declaration

public static boolean checkThemeLiscense(LookAndFeelInfo i) 

Method Source Code

//package com.java2s;

import javax.swing.UIManager.LookAndFeelInfo;

public class Main {
    /**/*from  w  w  w.j  ava 2s  . c o m*/
     * A static method for blocking the Quaqua theme from working with any OS but OSX.
     * This theme can still be forced from the admin menu, but to do so on non-OSX operating
     * system would be in violation of Macintosh's artwork.
     */
    public static boolean checkThemeLiscense(LookAndFeelInfo i) {
        String osName = System.getProperty("os.name").toLowerCase();
        String suitableName = i.getName();
        if (suitableName.startsWith("Quaqua") && !osName.startsWith("mac os x")) {
            return false;
        }
        return true;
    }
}

Related

  1. applyNimbusLaF()
  2. applyStartupLookAndFeel(String desiredLafClassName)
  3. checkGTKLookAndFeel()
  4. computeIsLafAqua()
  5. defaultLookAndFeel()
  6. enableLafIfAvailable(String lafName)
  7. fixLnF()