Package snap.props
Class PropChangeSupport
java.lang.Object
snap.props.PropChangeSupport
A class to easily add propery change support to a class (and DeepChange support).
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a DeepChangeListener.void
Adds a PropChangeListener.void
addPropChangeListener
(PropChangeListener aLsnr, String aProp) Adds a PropChangeListener for given prop.void
fireDeepChange
(Object aSrc, PropChange aPC) Sends the deep change.void
firePropChange
(String aProp, Object oldVal, Object newVal) Fires a property change.void
firePropChange
(String aProp, Object oldVal, Object newVal, int anIndex) Fires an indexed property change.void
firePropChange
(PropChange aPC) Sends the property change.boolean
Returns whether there is a deep listener.boolean
hasListener
(String aProp) Returns whether there is a listener for given prop.void
Removes a DeepChangeListener.void
Removes a PropChangeListener.void
removePropChangeListener
(PropChangeListener aLsnr, String aProp) Removes a PropChangeListener.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
PropChangeSupport
Constructor.
-
-
Method Details
-
addPropChangeListener
Adds a PropChangeListener. -
removePropChangeListener
Removes a PropChangeListener. -
addPropChangeListener
Adds a PropChangeListener for given prop. -
removePropChangeListener
Removes a PropChangeListener. -
hasListener
Returns whether there is a listener for given prop. -
firePropChange
Fires a property change. -
firePropChange
Fires an indexed property change. -
firePropChange
Sends the property change. -
hasDeepListener
public boolean hasDeepListener()Returns whether there is a deep listener. -
addDeepChangeListener
Adds a DeepChangeListener. -
removeDeepChangeListener
Removes a DeepChangeListener. -
fireDeepChange
Sends the deep change.
-