Beispiel #1
0
 private static boolean isWindows(LookAndFeel laf) {
   if (laf.getID() == "Windows") {
     return true;
   }
   if (!checkedForWindows) {
     try {
       WINDOWS_CLASS = Class.forName("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
     } catch (ClassNotFoundException e) {
     }
     checkedForWindows = true;
   }
   return (WINDOWS_CLASS != null && WINDOWS_CLASS.isInstance(laf));
 }
Beispiel #2
0
 private static boolean isKnownLookAndFeel() {
   LookAndFeel laf = UIManager.getLookAndFeel();
   String lookAndFeelID = laf.getID();
   return (lookAndFeelID == "GTK" || lookAndFeelID == "Aqua" || isMetal(laf) || isWindows(laf));
 }
Beispiel #3
0
 private static boolean isMetal(LookAndFeel laf) {
   return (laf.getID() == "Metal" || laf instanceof MetalLookAndFeel);
 }