/** If true, ButtonPanel will build a bitmap of the custom editor * button to use when painting - huge amounts of painting time in * XP and Aqua are used scaling the L&F's background button * bitmap (and the custom editor button is always a fixed size), * so this yields * better performance when a large number of custom editor buttons * are displayed. */ static boolean useOptimizedCustomButtonPainting() { if (useOptimizedCustomButtonPainting == null) { if ("com.sun.java.swing.plaf.WindowsLookAndFeel".equals( UIManager.getLookAndFeel())) { //NOI18N useOptimizedCustomButtonPainting = isXPTheme() ? Boolean.TRUE : Boolean.FALSE; } else if ("Aqua".equals (UIManager.getLookAndFeel().getID())) { //NOI18N useOptimizedCustomButtonPainting = Boolean.TRUE; } else { useOptimizedCustomButtonPainting = Boolean.FALSE; } } return useOptimizedCustomButtonPainting.booleanValue(); }
/** If true, ButtonPanel will build a bitmap of the custom editor * button to use when painting - huge amounts of painting time in * XP and Aqua are used scaling the L&F's background button * bitmap (and the custom editor button is always a fixed size), * so this yields * better performance when a large number of custom editor buttons * are displayed. */ static boolean useOptimizedCustomButtonPainting() { if (useOptimizedCustomButtonPainting == null) { if ("Windows".equals(UIManager.getLookAndFeel().getID())) { //NOI18N useOptimizedCustomButtonPainting = Boolean.valueOf(isXPTheme()); } else { useOptimizedCustomButtonPainting = Boolean.valueOf("Aqua".equals(UIManager.getLookAndFeel().getID())); } } return useOptimizedCustomButtonPainting.booleanValue(); }
/** If true, ButtonPanel will build a bitmap of the custom editor * button to use when painting - huge amounts of painting time in * XP and Aqua are used scaling the L&F's background button * bitmap (and the custom editor button is always a fixed size), * so this yields * better performance when a large number of custom editor buttons * are displayed. */ static boolean useOptimizedCustomButtonPainting() { if (useOptimizedCustomButtonPainting == null) { if ("com.sun.java.swing.plaf.WindowsLookAndFeel".equals( UIManager.getLookAndFeel())) { //NOI18N useOptimizedCustomButtonPainting = isXPTheme() ? Boolean.TRUE : Boolean.FALSE; } else if ("Aqua".equals (UIManager.getLookAndFeel().getID())) { //NOI18N useOptimizedCustomButtonPainting = Boolean.TRUE; } else { useOptimizedCustomButtonPainting = Boolean.FALSE; } } return useOptimizedCustomButtonPainting.booleanValue(); }
/** * @return True if Windows Vista Look and Feel is active. */ static boolean isWindowsVistaLaF() { if( !"Windows".equals( UIManager.getLookAndFeel().getID() ) ) return false; if( !isXPTheme() ) return false; return isWindowsVista() || isWindows7() || isWindows8(); }