Beispiel #1
0
 @Override
 public void propertyChange(PropertyChangeEvent ev) {
   String key = ev.getPropertyName();
   if ("UIDefaults".equals(key)) {
     compiledDefaults = null;
   } else {
     addDefault(key, ev.getNewValue());
   }
 }
Beispiel #2
0
  /**
   * {@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);
  }
Beispiel #3
0
 /** {@inheritDoc} */
 @Override
 public void propertyChange(PropertyChangeEvent e) {
   if (SynthLookAndFeel.shouldUpdateStyle(e)) {
     updateStyle((JSplitPane) e.getSource());
   }
 }