All Packages Class Hierarchy This Package Previous Next Index
Class java.beans.VetoableChangeSupport
java.lang.Object
|
+----java.beans.VetoableChangeSupport
- public class VetoableChangeSupport
- extends Object
- implements Serializable
This is a utility class that can be used by beans that support constrained
properties. Your can either inherit from this class or you can use
an instance of this class as a member field of your bean and delegate
various work to it.
-
VetoableChangeSupport(Object)
-
-
addVetoableChangeListener(VetoableChangeListener)
- Add a VetoableListener to the listener list.
-
fireVetoableChange(String, Object, Object)
- Report a vetoable property update to any registered listeners.
-
removeVetoableChangeListener(VetoableChangeListener)
- Remove a VetoableChangeListener from the listener list.
VetoableChangeSupport
public VetoableChangeSupport(Object sourceBean)
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Add a VetoableListener to the listener list.
- Parameters:
- listener - The VetoableChangeListener to be added
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Remove a VetoableChangeListener from the listener list.
- Parameters:
- listener - The VetoableChangeListener to be removed
fireVetoableChange
public void fireVetoableChange(String propertyName,
Object oldValue,
Object newValue) throws PropertyVetoException
- 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 property
that was changed.
- oldValue - The old value of the property.
- newValue - The new value of the property.
- Throws: PropertyVetoException
- if the recipient wishes the property
change to be rolled back.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature