|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.dataset.DataValue
public class DataValue
A DataValue is represents an expression attached to a DataSet, which
can be evaluated in the context of that DataSet to produce an Object end-value.
The expression is a String expression intended to be processed by a subclass
so that the getValue()
method returns an Object representing the
expression's result.
A DataValue
has a name, which should be unique for a given
DataSet
.
A DataValue
belongs to a single DataSet
.
DataSet
Field Summary | |
---|---|
protected static java.lang.String |
DEFAULT_NAME_PREFIX
Used as a prefix for auto-generated names. |
Constructor Summary | |
---|---|
DataValue(DataSet ds)
Creates a new instance of DataValue with an auto-generated name, for a given DataSet. |
|
DataValue(DataSet ds,
java.lang.String name)
Creates a new instance of DataValue, for a given DataSet. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this class for any changes to bean properties. |
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this class for specific property changes. |
DataSet |
getDataSet()
Returns the DataSet this DataValue belongs to. |
java.lang.String |
getExpression()
Returns the expression which will be evaluated to result in an actual value for this DataValue. |
java.lang.String |
getName()
Returns the current name for this DataValue. |
java.lang.Object |
getValue()
Returns the actual value resulting from the DataValue's expression being evaluated in the context of a DataSet. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Stops notifying a specific listener of any changes to bean properties. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Stops notifying a specific listener of changes to a specific property. |
void |
setExpression(java.lang.String expression)
Sets the string expression which, when evaluated, returns a DataValue. |
void |
setName(java.lang.String name)
Changes the name for this DataValue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DEFAULT_NAME_PREFIX
Constructor Detail |
---|
public DataValue(DataSet ds)
ds
- The DataSet that owns this DataValuepublic DataValue(DataSet ds, java.lang.String name)
ds
- The DataSet that owns this DataValuename
- The DataValue's name.Method Detail |
---|
public void setName(java.lang.String name)
name
- The new name.public java.lang.String getName()
public DataSet getDataSet()
public java.lang.String getExpression()
public void setExpression(java.lang.String expression)
expression
- The new expression for this DataValue.public java.lang.Object getValue()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to notify of changes to this
instance.public void addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- The name of the property to listen to changes for.listener
- The PropertyChangeListener to notify of changes to this
instance.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to stop receiving notifications.public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- The name of the property to ignore from now on.listener
- The listener to stop receiving notifications.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |