|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ValueHolder
is a foundation subcomponent for MapperXML which
is used by TextModels
to store/retrieve the current "state"
or value. A ValueHolder
can be used exclusively by a single
TextModel
or shared by multiple TextModels
. A
specific property of the ValueHolder
host object can also be
targeted. The targeted property can be specified by setting the
propertyName
property. (Note: the ValueHolder
implementation must be one that actually supports access to individual
properties for this feature to work, otherwise the propertyName
setting is ignored and the whole host object is accessed).
The data type of the targeted host object property (or the host object
itself) is available via the getJavaDataType
method.
The alias
property provides a way of naming this
ValueHolder
. This name is required when using the
ComponentFactory
to automatically create and bind
MapperXML components from an HTML/XML document.
The ValueHolder
also provides notification to
ChangeListeners
whenever the "state" or value changes. Interested
listeners can register or unregister to receive notification of
ChangeEvents
by using the addChangeListener
or
removeChangeListener
methods.
Note: This interface is subject to change. You should extend one of the existing classes rather than directly implementing this interface.
Method Summary | |
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds the specified change listener to receive change events from this value holder. |
java.lang.String |
getAlias()
Get the alias name for this ValueHolder. |
int |
getJavaDataType(java.lang.String propertyName)
Get the java data type for the given property |
java.lang.Object |
getPropertyValue(java.lang.String propertyName)
Get the value of the given property in the valueObject. |
java.lang.Object[] |
getPropertyValues(java.lang.String[] propertyNames)
Get the values for the given property names. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the specified change listener so that it no longer receives change events from this value holder. |
void |
setPropertyValue(java.lang.String propertyName,
java.lang.Object value)
Set the value of the given property in the valueObject. |
void |
setPropertyValues(java.lang.String[] propertyNames,
java.lang.Object[] values)
Set the values for the given properties in the valueObject. |
Method Detail |
public java.lang.Object getPropertyValue(java.lang.String propertyName) throws ModelException
ModelException
public java.lang.Object[] getPropertyValues(java.lang.String[] propertyNames) throws ModelException
propertyNames
- array of property names
ModelException
public void setPropertyValue(java.lang.String propertyName, java.lang.Object value) throws ModelException
propertyName
- the property name to setvalue
- the value to set the property to
ModelException
public void setPropertyValues(java.lang.String[] propertyNames, java.lang.Object[] values) throws ModelException
propertyNames
- the property names to setvalues
- the values to set the properties to
ModelException
public int getJavaDataType(java.lang.String propertyName) throws ModelException
ModelException
public java.lang.String getAlias()
public void removeChangeListener(javax.swing.event.ChangeListener l)
l
- the change listener to removepublic void addChangeListener(javax.swing.event.ChangeListener l)
l
- the change listener to add
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |