|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.favabeans.base.BeanProperty
A BeanProperty
is a Property
implementation corresponding directly to a Java Bean property of an
object.
Constructor Summary | |
BeanProperty(Object target,
PropertyDescriptor descriptor)
|
|
BeanProperty(Object target,
String propertyName)
|
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
|
protected PropertyEditor |
createPropertyEditor()
|
protected void |
finalize()
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
protected void |
fireStateChanged()
|
protected void |
fireValuePropertyChange(Object oldValue,
Object newValue)
|
Facet |
getFacet(Type type)
Obtain a Facet of the requested Type
for this object. |
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BeanProperty(Object target, String propertyName)
public BeanProperty(Object target, PropertyDescriptor descriptor)
Method Detail |
protected void finalize()
finalize
in class Object
public Object getTarget()
Feature
Feature
.getTarget
in interface Feature
org.favabeans.base.Feature
public Facet getFacet(Type type)
Faceted
Facet
of the requested Type
for this object.getFacet
in interface Faceted
org.favabeans.base.Faceted
type
- the Type
of Facet
requested for this object.Facet
, or null
if none can
be created as requested.public String getName()
Property
getName
in interface Property
org.favabeans.base.Property
public Class getValueClass()
Property
Property
. As a minimum, this
operation should return Object
.getValueClass
in interface Property
org.favabeans.base.Property
public boolean isEnabled()
Property
Property
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 Property
org.favabeans.base.Property
true
if this Property
is
enabled; false
if it is disabled.public PropertyEditor newEditor()
Property
PropertyEditor
instance suitable for
editing the value of ths Property object, as in a
"property sheet" view.newEditor
in interface Property
org.favabeans.base.Property
PropertyEditor
.public Object getValue()
Property
Property
.getValue
in interface Property
org.favabeans.base.Property
Property
.public boolean isValueSettable()
Property
Property
can
be set. If this method returns false
, calls to
setValue
will return silently with no effect.isValueSettable
in interface Property
org.favabeans.base.Property
true
if the value can be set;
false
otherwise.public boolean isValueSettable(Object value)
Property
Property.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 Property
org.favabeans.base.Property
value
- the candidate property value.false
if the candidate value is known to
be unacceptable; true
otherwise.public void setValue(Object value) throws PropertyValueException
Property
Property
.setValue
in interface Property
org.favabeans.base.Property
value
- 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 Property
public 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
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
protected void fireValuePropertyChange(Object oldValue, Object newValue)
protected void fireStateChanged()
protected PropertyEditor createPropertyEditor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |