|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.favabeans.base.MetadataProperty
A MetadataProperty is a read-only
Property implementation which obtains its value from
the FavaBeans type metadata registry, FavaBeans.TYPE_METADATA.
| Constructor Summary | |
MetadataProperty(Object target,
String key,
Class valueClass)
Create a new MetadataProperty for an object. |
|
| Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
|
String |
getKey()
|
String |
getName()
Obtain the programmatic name of this property. |
Object |
getTarget()
Obtain the target of this Feature. |
Object |
getValue()
Obtain the value of the Property. |
Class |
getValueClass()
Determine the most general Java class of the objects which are values of this Property. |
boolean |
isEnabled()
Determine whether this Property is enabled. |
boolean |
isValueSettable()
Determine whether the value of this Property can
be set. |
boolean |
isValueSettable(Object value)
Check if the given value is an allowable argument to setValue(Object). |
PropertyEditor |
newEditor()
Obtain a PropertyEditor instance suitable for
editing the value of ths Property object, as in a
"property sheet" view. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener l)
|
void |
setValue(Object value)
Set the value of the Property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MetadataProperty(Object target,
String key,
Class valueClass)
MetadataProperty for an object.target - the object for which this
MetadataProperty is to be created.key - the metadata registry key for looking up the values
of this property. See TypeMetadataRegistry.getForObject(Object,String).valueClass - the most general Java class of the values of
this property. See Property.getValueClass().| Method Detail |
public String getKey()
public String getName()
PropertygetName in interface Propertyorg.favabeans.base.Propertypublic Object getTarget()
FeatureFeature.getTarget in interface Featureorg.favabeans.base.Featurepublic Class getValueClass()
PropertyProperty. As a minimum, this
operation should return Object.getValueClass in interface Propertyorg.favabeans.base.Propertypublic boolean isEnabled()
PropertyProperty is enabled. a
"disabled" property is one which should be displayed in UI
elements, but in a state which indicates that it is
non-functional and/or non-applicable (e.g., by "graying out").isEnabled in interface Propertyorg.favabeans.base.Propertytrue if this Property is
enabled; false if it is disabled.public PropertyEditor newEditor()
PropertyPropertyEditor instance suitable for
editing the value of ths Property object, as in a
"property sheet" view.newEditor in interface Propertyorg.favabeans.base.PropertyPropertyEditor.public Object getValue()
PropertyProperty.getValue in interface Propertyorg.favabeans.base.PropertyProperty.public boolean isValueSettable()
PropertyProperty can
be set. If this method returns false, calls to
setValue will return silently with no effect.isValueSettable in interface Propertyorg.favabeans.base.Propertytrue if the value can be set;
false otherwise.public boolean isValueSettable(Object value)
PropertyProperty.setValue(Object). This should be overridden to provide
end-user feedback regarding the correctness of a property
value, where such information is available to the
implementation.
The default behavior of this method is to return
true, and throw an exception in Property.setValue(Object) if necessary.
isValueSettable in interface Propertyorg.favabeans.base.Propertyvalue - the candidate property value.false if the candidate value is known to
be unacceptable; true otherwise.
public void setValue(Object value)
throws PropertyValueException
PropertyProperty.setValue in interface Propertyorg.favabeans.base.Propertyvalue - the desired new value of the Property.PropertyValueException - if there was a problem
setting the value, or if the value was not acceptable.public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface Propertypublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface Property
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
addPropertyChangeListener in interface Property
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener l)
removePropertyChangeListener in interface Property
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||