|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.binding.beans.Model
com.jgoodies.binding.value.AbstractValueModel
com.jgoodies.binding.beans.BeanAdapter.SimplePropertyAdapter
public class BeanAdapter.SimplePropertyAdapter
Implements the access to the individual bean properties. All SimplePropertyAdapters created by this BeanAdapter share a single PropertyChangeListener that is used to fire value changes in this SimplePropertyAdapter.
This class is public to enable reflection access.
| Field Summary |
|---|
| Fields inherited from class com.jgoodies.binding.value.AbstractValueModel |
|---|
PROPERTYNAME_VALUE |
| Constructor Summary | |
|---|---|
protected |
BeanAdapter.SimplePropertyAdapter(java.lang.String propertyName,
java.lang.String getterName,
java.lang.String setterName)
Constructs a SimplePropertyAdapter for the given property name, getter and setter name. |
| Method Summary | |
|---|---|
protected void |
fireChange(B currentBean)
|
java.lang.Object |
getValue()
Returns the value of the adapted bean property, or null if the bean is null. |
protected void |
setBean0(B oldBean,
B newBean)
|
void |
setValue(java.lang.Object newValue)
Sets the given object as new value of the adapted bean property. |
void |
setVetoableValue(java.lang.Object newValue)
Sets the given object as new value of the adapted bean property. |
| Methods inherited from class com.jgoodies.binding.value.AbstractValueModel |
|---|
addValueChangeListener, booleanValue, doubleValue, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, floatValue, getString, intValue, longValue, removeValueChangeListener, setValue, setValue, setValue, setValue, setValue, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected BeanAdapter.SimplePropertyAdapter(java.lang.String propertyName,
java.lang.String getterName,
java.lang.String setterName)
propertyName - the name of the property to adaptgetterName - the name of the method that reads the valuesetterName - the name of the method that sets the value| Method Detail |
|---|
public java.lang.Object getValue()
public void setValue(java.lang.Object newValue)
null. If the bean setter
throws a PropertyVetoException, it is silently ignored.
This write operation is supported only for writable bean properties.Notifies any registered value listener if the bean reports a property change. Note that a bean may suppress PropertyChangeEvents if the old and new value are the same, or if the old and new value are equal.
newValue - the value to set
java.lang.UnsupportedOperationException - if the property is read-only
PropertyNotFoundException - if the property could not be found
PropertyAccessException - if the new value could not be set
public void setVetoableValue(java.lang.Object newValue)
throws java.beans.PropertyVetoException
null. If the bean setter
throws a PropertyVetoExeption, this method throws the same exception.
This write operation is supported only for writable bean properties.Notifies any registered value listener if the bean reports a property change. Note that a bean may suppress PropertyChangeEvents if the old and new value are the same, or if the old and new value are equal.
newValue - the value to set
java.lang.UnsupportedOperationException - if the property is read-only
PropertyNotFoundException - if the property could not be found
PropertyAccessException - if the new value could not be set
java.beans.PropertyVetoException - if the invoked bean setter
throws a PropertyVetoExceptionprotected void fireChange(B currentBean)
protected void setBean0(B oldBean,
B newBean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||