java.beans

Interface VetoableChangeListener

public interface VetoableChangeListener extends EventListener

VetoableChangeListener allows a class to monitor proposed changes to properties of a Bean and, if desired, prevent them from occurring. A vetoableChange() event will be fired after the property change has been requested, but before it is permanent. If any listener rejects the change by throwing the PropertyChangeException, a new vetoableChange() event will be fired to all listeners who received a vetoableChange() event in the first place, informing them to revert back to the old value. Thus, the listener that threw the exception the first time should be prepared to rethrow it the second time. The value, of course, never actually changed.

Note: This class may not be reliably used to determine whether a property has actually changed. Use the PropertyChangeListener interface for that instead.

Since: 1.1

See Also: PropertyChangeListener VetoableChangeSupport

UNKNOWN: updated to 1.4

Method Summary
voidvetoableChange(PropertyChangeEvent e)
Fired before a Bean's property changes.

Method Detail

vetoableChange

public void vetoableChange(PropertyChangeEvent e)
Fired before a Bean's property changes.

Parameters: e the change (containing the old and new values)

Throws: PropertyVetoException if the change is vetoed by the listener