Package snap.props

Class PropChangeSupport

java.lang.Object
snap.props.PropChangeSupport

public class PropChangeSupport extends Object
A class to easily add propery change support to a class (and DeepChange support).
  • Field Details

  • Constructor Details

    • PropChangeSupport

      public PropChangeSupport(Object aSrc)
      Constructor.
  • Method Details

    • addPropChangeListener

      public void addPropChangeListener(PropChangeListener aLsnr)
      Adds a PropChangeListener.
    • removePropChangeListener

      public void removePropChangeListener(PropChangeListener aLsnr)
      Removes a PropChangeListener.
    • addPropChangeListener

      public void addPropChangeListener(PropChangeListener aLsnr, String aProp)
      Adds a PropChangeListener for given prop.
    • removePropChangeListener

      public void removePropChangeListener(PropChangeListener aLsnr, String aProp)
      Removes a PropChangeListener.
    • hasListener

      public boolean hasListener(String aProp)
      Returns whether there is a listener for given prop.
    • firePropChange

      public void firePropChange(String aProp, Object oldVal, Object newVal)
      Fires a property change.
    • firePropChange

      public void firePropChange(String aProp, Object oldVal, Object newVal, int anIndex)
      Fires an indexed property change.
    • firePropChange

      public void firePropChange(PropChange aPC)
      Sends the property change.
    • hasDeepListener

      public boolean hasDeepListener()
      Returns whether there is a deep listener.
    • addDeepChangeListener

      public void addDeepChangeListener(DeepChangeListener aLsnr)
      Adds a DeepChangeListener.
    • removeDeepChangeListener

      public void removeDeepChangeListener(DeepChangeListener aLsnr)
      Removes a DeepChangeListener.
    • fireDeepChange

      public void fireDeepChange(Object aSrc, PropChange aPC)
      Sends the deep change.