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. You can use an instance of this class as a member field of your bean and delegate various work to it.


Constructor Index

 o VetoableChangeSupport(Object)

Method Index

 o addVetoableChangeListener(VetoableChangeListener)
Add a VetoableListener to the listener list.
 o fireVetoableChange(String, Object, Object)
Report a vetoable property update to any registered listeners.
 o removeVetoableChangeListener(VetoableChangeListener)
Remove a VetoableChangeListener from the listener list.

Constructors

 o VetoableChangeSupport public VetoableChangeSupport(Object sourceBean)

Methods

 o addVetoableChangeListener public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Add a VetoableListener to the listener list.

Parameters:
listener - The VetoableChangeListener to be added
 o removeVetoableChangeListener public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list.

Parameters:
listener - The VetoableChangeListener to be removed
 o 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