Java Swing Look and Feel isNimbusGTKTheme()

Here you can find the source of isNimbusGTKTheme()

Description

Determines if current L&F is GTK using Nimbus theme

License

Open Source License

Declaration

public static boolean isNimbusGTKTheme() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Toolkit;

import javax.swing.UIManager;

public class Main {
    /**//from w  w w . ja  v a 2 s.  c om
     * Determines if current L&F is GTK using Nimbus theme
     */
    public static boolean isNimbusGTKTheme() {
        // is current L&F GTK using Nimbus theme?
        return isGTKLookAndFeel()
                && "nimbus".equals(Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Net/ThemeName")); //NOI18N
    }

    /**
     * Determines if current L&F is GTKLookAndFeel
     */
    public static boolean isGTKLookAndFeel() {
        // is current L&F some kind of GTKLookAndFeel?
        return UIManager.getLookAndFeel().getID().equals("GTK"); //NOI18N
    }
}

Related

  1. isMotiflLnF()
  2. isNativeMacLookAndFeel()
  3. isNimbus()
  4. isNimbus()
  5. isNimbus()
  6. isNimbusLookAndFeel()
  7. isNimbusLookAndFeel()
  8. isPlasticLaf()
  9. isQuaqua()