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()); } }
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()); } } } } };
try { if (XPUtils.isXPStyleOn()) { _instance.setColorName(XPUtils.getColorName());