public class BeanAdapter.SimplePropertyAdapter extends AbstractValueModel
This class is public to enable reflection access.
PROPERTY_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
BeanAdapter.SimplePropertyAdapter(String propertyName,
String getterName,
String setterName)
Constructs a SimplePropertyAdapter for the given property name,
getter and setter name.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
fireChange(B currentBean) |
protected void |
fireChange(Object oldValue,
Object newValue) |
Object |
getValue()
Returns the value of the adapted bean property, or null
if the bean is null.
|
protected String |
paramString()
Returns a string representing the state of this model.
|
protected void |
setBean0(B oldBean,
B newBean) |
void |
setValue(Object newValue)
Sets the given object as new value of the adapted bean property.
|
void |
setVetoableValue(Object newValue)
Sets the given object as new value of the adapted bean property.
|
addValueChangeListener, booleanValue, doubleValue, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, floatValue, getString, intValue, longValue, removeValueChangeListener, setValue, setValue, setValue, setValue, setValue, toString, valueStringcreatePropertyChangeSupport, firePropertyChangeaddPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerprotected BeanAdapter.SimplePropertyAdapter(String propertyName, String getterName, 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 valuepublic Object getValue()
public void setValue(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 setUnsupportedOperationException - if the property is read-onlyPropertyNotFoundException - if the property could not be foundPropertyAccessException - if the new value could not be setpublic void setVetoableValue(Object newValue) throws 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 setUnsupportedOperationException - if the property is read-onlyPropertyNotFoundException - if the property could not be foundPropertyAccessException - if the new value could not be setPropertyVetoException - if the invoked bean setter
throws a PropertyVetoExceptionprotected void fireChange(B currentBean)
protected String paramString()
AbstractValueModelnull.paramString in class AbstractValueModelCopyright © 2002-2015 JGoodies Software GmbH. All Rights Reserved.