public static void main(String[] args) { try { System.out.println(XPUtils.isXPStyleOn()); } catch (UnsupportedOperationException e) { System.out.println("Unknown XP style because " + e.getMessage()); } try { System.out.println(XPUtils.getColorName()); } catch (UnsupportedOperationException e) { System.out.println("Unknown XP color because " + e.getMessage()); } System.out.println(XPUtils.getXPStyleDll()); } }
if (XPUtils.isXPStyleOn()) { _instance.setColorName(XPUtils.getColorName());
/** * Should the arrow be displayed on the top of the header. * * @return true to display the sort arrow on top. Otherwise false. */ protected boolean shouldDisplayOnTop() { return SystemInfo.isWindowsVistaAbove() && (UIManager.getLookAndFeel() instanceof WindowsLookAndFeel && !(UIManager.getLookAndFeel() instanceof WindowsClassicLookAndFeel)) && XPUtils.isXPStyleOn(); }
public void propertyChange(PropertyChangeEvent evt) { if (Office2003Painter.isNative()) { if (XPUtils.PROPERTY_COLORNAME.equals(evt.getPropertyName())) { if (evt.getNewValue() != null) { _instance.setColorName((String) evt.getNewValue()); } else { _instance.setColorName(""); } } else if (XPUtils.PROPERTY_THEMEACTIVE.equals(evt.getPropertyName())) { if (evt.getNewValue().equals(Boolean.FALSE)) _instance.setColorName(""); else { _instance.setColorName(XPUtils.getColorName()); } } } } };
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { if (XPUtils.isXPStyleOn()) { if (_insets.top > 0) { g.setColor(_shadow);
suggestedStyle = EXTENSION_STYLE_OFFICE2007; else if (XPUtils.isXPStyleOn() && UIManager.getLookAndFeel() instanceof WindowsLookAndFeel) { suggestedStyle = EXTENSION_STYLE_OFFICE2003;