public class VetoableProperty extends AbstractProperty
| Constructor and Description |
|---|
VetoableProperty(java.lang.Object sourceBean,
java.lang.String name)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener.
|
boolean |
isVetoable()
Indicates if changes to this property can be vetoed.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a VetoableChangeListener.
|
void |
setValue(java.lang.Object newValue)
Sets the property value.
|
void |
setValueAndNotifyListeners(java.lang.Object newValue)
Sets the property value.
|
addPropertyChangeListener, clearValue, getName, getSourceBean, getValue, isReporting, notifyListeners, removePropertyChangeListener, setCurrentValue, setReportingpublic VetoableProperty(java.lang.Object sourceBean,
java.lang.String name)
sourceBean - The source Bean of the property.name - The name of the property.public boolean isVetoable()
isVetoable in interface PropertyisVetoable in class AbstractPropertypublic void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
addVetoableChangeListener in interface PropertyaddVetoableChangeListener in class AbstractPropertylistener - The VetoableChangeListener to add.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
removeVetoableChangeListener in interface PropertyremoveVetoableChangeListener in class AbstractPropertylistener - The VetoableChangeListener to remove.public void setValueAndNotifyListeners(java.lang.Object newValue)
throws java.beans.PropertyVetoException
isReporting() is true. Will always notify all
VetoableChangeListener-s.setValueAndNotifyListeners in interface PropertysetValueAndNotifyListeners in class AbstractPropertynewValue - The new property value.java.beans.PropertyVetoException - A registered VetoableChangeListener objected
to the change. The change was not committed.public void setValue(java.lang.Object newValue)
throws java.beans.PropertyVetoException
setValue in interface PropertysetValue in class AbstractPropertynewValue - The new property value.java.beans.PropertyVetoException - A registered VetoableChangeListener objected
to the change. The change was not committed.