| |
|
| java.lang.Object java.beans.VetoableChangeSupport
VetoableChangeSupport | public class VetoableChangeSupport implements java.io.Serializable(Code) | | This is a utility class that can be used by beans that support constrained
properties. You can use an instance of this class as a member field
of your bean and delegate various work to it.
This class is serializable. When it is serialized it will save
(and restore) any listeners that are themselves serializable. Any
non-serializable listeners will be skipped during serialization.
|
serialVersionUID | final static long serialVersionUID(Code) | | Serialization version ID, so we're compatible with JDK 1.1
|
VetoableChangeSupport | public VetoableChangeSupport(Object sourceBean)(Code) | | Constructs a VetoableChangeSupport object.
Parameters: sourceBean - The bean to be given as the source for any events. |
addVetoableChangeListener | public synchronized void addVetoableChangeListener(VetoableChangeListener listener)(Code) | | Add a VetoableListener to the listener list.
The listener is registered for all properties.
Parameters: listener - The VetoableChangeListener to be added |
fireVetoableChange | public void fireVetoableChange(String propertyName, Object oldValue, Object newValue) throws PropertyVetoException(Code) | | Report a vetoable property update to any registered listeners. If
anyone vetos the change, then fire a new event reverting everyone to
the old value and then rethrow the PropertyVetoException.
No event is fired if old and new are equal and non-null.
Parameters: propertyName - The programmatic name of the propertythat is about to change.. Parameters: oldValue - The old value of the property. Parameters: newValue - The new value of the property. exception: PropertyVetoException - if the recipient wishes the propertychange to be rolled back. |
removeVetoableChangeListener | public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)(Code) | | Remove a VetoableChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.
Parameters: listener - The VetoableChangeListener to be removed |
|
|
|