@Deprecated public class DefaultPropertyModel extends Object implements ExPropertyModel, PropertyChangeListener
PROP_VALUE| Constructor and Description |
|---|
DefaultPropertyModel(Object bean,
PropertyDescriptor descr)
Deprecated.
Creates new DefaultPropertyModel with provided specific
PropertyDescriptor. |
DefaultPropertyModel(Object bean,
String propertyName)
Deprecated.
Creates new DefaultPropertyModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Deprecated.
Adds listener to change of the value.
|
Object[] |
getBeans()
Deprecated.
Returns an array of beans/nodes that this property belongs
to.
|
FeatureDescriptor |
getFeatureDescriptor()
Deprecated.
Returns descriptor describing the property.
|
Class |
getPropertyEditorClass()
Deprecated.
The class of the property editor or
null
if default property editor should be used. |
Class |
getPropertyType()
Deprecated.
The class of the property.
|
Object |
getValue()
Deprecated.
Getter for current value of a property.
|
void |
propertyChange(PropertyChangeEvent evt)
Deprecated.
Implementation of PropertyChangeListener method
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Deprecated.
Removes listener to change of the value.
|
void |
setValue(Object v)
Deprecated.
Setter for a value of a property.
|
public DefaultPropertyModel(Object bean, String propertyName) throws IllegalArgumentException
bean - the java bean to be introspectedpropertyName - name of the propertyIllegalArgumentException - if there is any problem
with the parameters (introspection of bean,...)public DefaultPropertyModel(Object bean, PropertyDescriptor descr)
PropertyDescriptor. This can be useful if one needs to
set to provide specific attributes to the property editor.
PropertyDescriptor pd = new PropertyDescriptor ("myProperty", bean.getClass ());
pd.setPropertyEditorClass (PropertyEditorManager.findEditor (Object.class));
// special attributes to the property editor
pb.setValue ("superClass", MyProperty.class);
model = new DefaultPropertyModel (bean, pd);
panel = new PropertyPanel (model);
This constructor replaces the default use of BeanInfo and that is why
simplifies the use of ExPropertyEditors.bean - the java bean to be introspecteddescr - the property descriptor of the property to usepublic Class getPropertyType()
PropertyModelgetPropertyType in interface PropertyModelpublic Object getValue() throws InvocationTargetException
getValue in interface PropertyModelInvocationTargetException - if, for example, the getter method
cannot be accessedpublic void setValue(Object v) throws InvocationTargetException
setValue in interface PropertyModelv - the valueInvocationTargetExceptionpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface PropertyModelpublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface PropertyModelpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic Class getPropertyEditorClass()
null
if default property editor should be used.getPropertyEditorClass in interface PropertyModelpublic Object[] getBeans()
getBeans in interface ExPropertyModelpublic FeatureDescriptor getFeatureDescriptor()
getFeatureDescriptor in interface ExPropertyModelBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.