@Override public void propertyChange(PropertyChangeEvent ev) { String key = ev.getPropertyName(); if ("UIDefaults".equals(key)) { compiledDefaults = null; } else { addDefault(key, ev.getNewValue()); } }
/** * {@inheritDoc} * * <p>Overridden to return {@code true} when one of the following properties change: * * <ul> * <li>{@code "Nimbus.Overrides"} * <li>{@code "Nimbus.Overrides.InheritDefaults"} * <li>{@code "JComponent.sizeVariant"} * </ul> * * @since 1.7 */ @Override protected boolean shouldUpdateStyleOnEvent(PropertyChangeEvent ev) { String eName = ev.getPropertyName(); // These properties affect style cached inside NimbusDefaults (6860433) if ("name" == eName || "ancestor" == eName || "Nimbus.Overrides" == eName || "Nimbus.Overrides.InheritDefaults" == eName || "JComponent.sizeVariant" == eName) { JComponent c = (JComponent) ev.getSource(); defaults.clearOverridesCache(c); return true; } return super.shouldUpdateStyleOnEvent(ev); }
/** {@inheritDoc} */ @Override public void propertyChange(PropertyChangeEvent e) { if (SynthLookAndFeel.shouldUpdateStyle(e)) { updateStyle((JSplitPane) e.getSource()); } }