Class com.symantec.itools.beans.VetoableChangeSupport
All Packages Class Hierarchy This Package Previous Next Index
Class com.symantec.itools.beans.VetoableChangeSupport
Object
|
+----VetoableChangeSupport
|
+----com.symantec.itools.beans.VetoableChangeSupport
- public class VetoableChangeSupport
- extends VetoableChangeSupport
- 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.
This extension of the java.beans.VetoableChangeSupport class adds
functionality to handle individual property changes.
- Author:
- Symantec
-
listenerTable
- The listener table.
-
com.symantec.itools.beans.VetoableChangeSupport(Object)
- Constructs a VetoableChangeSupport object.
-
addVetoableChangeListener(String, VetoableChangeListener)
- Adds a VetoableListener to the listener list.
-
fireVetoableChange(String, Object, Object)
- Reports a vetoable property update to any registered listeners.
-
removeVetoableChangeListener(String, VetoableChangeListener)
- Removes a VetoableChangeListener from the listener list.
listenerTable
protected java.util.Hashtable listenerTable
- The listener table.
- See Also:
- addVetoableChangeListener, removeVetoableChangeListener
VetoableChangeSupport
public VetoableChangeSupport(Object sourceBean)
- Constructs a VetoableChangeSupport object.
- Parameters:
- sourceBean - the bean to be given as the source for any events
addVetoableChangeListener
public synchronized void addVetoableChangeListener(String propertyName,
VetoableChangeListener listener)
- Adds a VetoableListener to the listener list.
- Parameters:
- propertyName - the name of the property to add a listener for
- listener - the VetoableChangeListener to be added
- See Also:
- removeVetoableChangeListener
fireVetoableChange
public void fireVetoableChange(String propertyName,
Object oldValue,
Object newValue) throws PropertyVetoException
- Reports a vetoable property update to any registered listeners.
If anyone vetos the change, then a new event is fired reverting everyone to
the old value, and then the PropertyVetoException is rethrown.
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 specified property value is unacceptable
- Overrides:
- fireVetoableChange in class VetoableChangeSupport
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(String propertyName,
VetoableChangeListener listener)
- Removes a VetoableChangeListener from the listener list.
- Parameters:
- propertyName - the name of the property to remove a listener for.
- listener - the VetoableChangeListener to be removed
- See Also:
- addVetoableChangeListener
All Packages Class Hierarchy This Package Previous Next Index