List of utility methods to do Swing Look and Feel
boolean | isLookAndFeel(String name) is Look And Feel return UIManager.getLookAndFeel().getClass().getName().equals(name);
|
boolean | isLookAndFeelNative() is Look And Feel Native return UIManager.getSystemLookAndFeelClassName().equals(UIManager.getLookAndFeel().getClass().getName());
|
boolean | isMacAquaLookAndFeel() is Mac Aqua Look And Feel if (MacAquaLAF_set == false) { MacAquaLAF = isMacPlatform() && javax.swing.UIManager.getLookAndFeel().getName().toLowerCase().indexOf("aqua") >= 0; MacAquaLAF_set = true; return MacAquaLAF; |
boolean | isMacLookAndFeel() Gets whether the current look and feel is Mac OS X native. final LookAndFeel laf = UIManager.getLookAndFeel(); return laf.getClass().getName().equals("apple.laf.AquaLookAndFeel"); |
boolean | isMacLookAndFeel() is Mac Look And Feel String name = UIManager.getLookAndFeel().getClass().getName(); return name.startsWith("com.apple"); |
boolean | isMacOSXLookAndFeel() Return true if the current look and feel is the MacOSX look and feel. LookAndFeel lookAndFeel = UIManager.getLookAndFeel(); if (lookAndFeel == null) { return false; return JDK15_MAC_OSX_LOOK_AND_FEEL_CLASS_NAME.equals(lookAndFeel.getClass().getName()) || JDK16_MAC_OSX_LOOK_AND_FEEL_CLASS_NAME.equals(lookAndFeel.getClass().getName()); |
boolean | isMetalLookAndFeel() Returns whether the current applied look and feel is the MetalLookAndFeel return UIManager.getLookAndFeel() instanceof MetalLookAndFeel; |
boolean | isMotif() is Motif String laf = UIManager.getLookAndFeel().getClass().getName(); if (laf.equals("com.sun.java.swing.plaf.motif.MotifLookAndFeel")) return true; else return false; |
boolean | isMotiflLnF() Returns whether we're currently running the Motif Look&Feel. return UIManager.getLookAndFeel().getID().equals("Motif"); |
boolean | isNativeMacLookAndFeel() is Native Mac Look And Feel if (!isMac()) { return false; String laf = UIManager.getLookAndFeel().getClass().getName(); return (laf.equals(UIManager.getSystemLookAndFeelClassName())); |