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, setReporting
public 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 Property
isVetoable
in class AbstractProperty
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
addVetoableChangeListener
in interface Property
addVetoableChangeListener
in class AbstractProperty
listener
- The VetoableChangeListener to add.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
removeVetoableChangeListener
in interface Property
removeVetoableChangeListener
in class AbstractProperty
listener
- 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 Property
setValueAndNotifyListeners
in class AbstractProperty
newValue
- 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 Property
setValue
in class AbstractProperty
newValue
- The new property value.java.beans.PropertyVetoException
- A registered VetoableChangeListener objected
to the change. The change was not committed.