![JAR search and dependency download from the Maven repository](/logo.png)
com.objogate.wl.swing.UI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of windowlicker-swing Show documentation
Show all versions of windowlicker-swing Show documentation
This is the Windowlicker Swing library.
The newest version!
package com.objogate.wl.swing;
import javax.swing.UIManager;
import com.objogate.exception.Defect;
public enum UI {
AQUA("apple.laf.AquaLookAndFeel"),
GTK("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"),
METAL("javax.swing.plaf.metal.MetalLookAndFeel"),
WINDOWS("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")
;
public final String classOfLookAndFeel;
UI(String className) {
this.classOfLookAndFeel = className;
}
public static boolean is(UI l) {
String name = UIManager.getLookAndFeel().getName();
switch (l) {
case AQUA:
return name.toLowerCase().contains("aqua")
|| name.equals("Mac OS X");
case GTK:
return name.toLowerCase().contains("gtk");
case METAL:
return name.toLowerCase().contains("metal");
case WINDOWS:
return name.toLowerCase().contains("windows");
}
throw new Defect("Need to implement " + l);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy