|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.beans.AbstractProperty
ucar.unidata.beans.VetoableProperty
public class VetoableProperty
Provides support for vetoable JavaBean properties. A VetoableProperty is a Property that has the capablity of having changes to its value vetoed by registered VetoableChangeListener-s. This implementation conserves memory by allocating storage for VetoableChangeListeners only when the first one is added to this property.
| Constructor Summary | |
|---|---|
VetoableProperty(Object sourceBean,
String name)
Constructs an instance. |
|
| Method Summary | |
|---|---|
void |
addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener. |
boolean |
isVetoable()
Indicates if changes to this property can be vetoed. |
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Removes a VetoableChangeListener. |
void |
setValue(Object newValue)
Sets the property value. |
void |
setValueAndNotifyListeners(Object newValue)
Sets the property value. |
| Methods inherited from class ucar.unidata.beans.AbstractProperty |
|---|
addPropertyChangeListener, clearValue, getName, getSourceBean, getValue, isReporting, notifyListeners, removePropertyChangeListener, setCurrentValue, setReporting |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VetoableProperty(Object sourceBean,
String name)
sourceBean - The source Bean of the property.name - The name of the property.| Method Detail |
|---|
public boolean isVetoable()
isVetoable in interface PropertyisVetoable in class AbstractPropertypublic void addVetoableChangeListener(VetoableChangeListener listener)
addVetoableChangeListener in interface PropertyaddVetoableChangeListener in class AbstractPropertylistener - The VetoableChangeListener to add.public void removeVetoableChangeListener(VetoableChangeListener listener)
removeVetoableChangeListener in interface PropertyremoveVetoableChangeListener in class AbstractPropertylistener - The VetoableChangeListener to remove.
public void setValueAndNotifyListeners(Object newValue)
throws PropertyVetoException
isReporting() is true. Will always notify all
VetoableChangeListener-s.
setValueAndNotifyListeners in interface PropertysetValueAndNotifyListeners in class AbstractPropertynewValue - The new property value.
PropertyVetoException - A registered VetoableChangeListener objected
to the change. The change was not committed.
public void setValue(Object newValue)
throws PropertyVetoException
setValue in interface PropertysetValue in class AbstractPropertynewValue - The new property value.
PropertyVetoException - A registered VetoableChangeListener objected
to the change. The change was not committed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||