List of utility methods to do Swing Look and Feel
boolean | isSystemLookAndFeel() is System Look And Feel String systemLookAndFeelClassName = UIManager.getSystemLookAndFeelClassName();
String currentLookAndFeelClassName = UIManager.getLookAndFeel().getClass().getName();
return systemLookAndFeelClassName.equals(currentLookAndFeelClassName);
|
boolean | isUnderIntelliJLaF() is Under Intelli J La F return UIManager.getLookAndFeel().getName().contains("IntelliJ"); |
boolean | isUnderWindowsClassicLookAndFeel() is Under Windows Classic Look And Feel return UIManager.getLookAndFeel().getName().equals("Windows Classic"); |
boolean | isWebLookAndFeelInstalled() is Web Look And Feel Installed LookAndFeel laf = UIManager.getLookAndFeel();
return isWebLookAndFeel(laf.getClass().getName());
|
boolean | isWindows() is Windows Object laf = UIManager.getLookAndFeel(); if (laf.getClass().getName().equals("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) { return true; return false; |
boolean | isWindowsClassicLookAndFeel() Determines if current L&F is Windows Classic LookAndFeel if (!isWindowsLookAndFeel()) { return false; return (!isWindowsXPLookAndFeel() && !isWindowsVistaLookAndFeel()); |
boolean | isWindowsClassicLookAndFeel() Determines if current L&F is Windows Classic LookAndFeel if (!isWindowsLookAndFeel()) { return false; return (!isWindowsXPLookAndFeel() && !isWindowsVistaLookAndFeel()); |
boolean | isWindowsLaF() is Windows La F return UIManager.getLookAndFeel().getName().contains("Windows"); |
boolean | isWindowsLookAndFeel() Returns whether the current applied look and feel is the WindowsLookAndFeel return isLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
boolean | isWindowsLookAndFeel() is Windows Look And Feel try { final Class<?> clsLaf = Class.forName("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); return clsLaf.isAssignableFrom(UIManager.getLookAndFeel().getClass()); } catch (ClassNotFoundException ex) { return false; |