com.taursys.model
Class VariantValueHolder
java.lang.Object
com.taursys.model.AbstractValueHolder
com.taursys.model.ObjectValueHolder
com.taursys.model.VariantValueHolder
- All Implemented Interfaces:
- javax.swing.event.ChangeListener, java.util.EventListener, ValueHolder
- public class VariantValueHolder
- extends ObjectValueHolder
ValueHolder which stores a given type of value internally. An instance
of this class is constructed by giving it the java data type. After that,
the instance will only store/retrieve that data type.
Constructor Summary |
VariantValueHolder(int javaDataType)
Constructs a new VariantValueHolder for the given data type. |
Method Summary |
int |
getJavaDataType(java.lang.String propertyName)
Returns the java data type (propertyName is ignored) |
void |
setPropertyValue(java.lang.String propertyName,
java.lang.Object newValue)
Sets the current value (propertyName is ignored). |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class com.taursys.model.ObjectValueHolder |
addChangeListener, fireContentValueChanged, getObject, getParentPropertyName, getParentValueHolder, getPropertyValue, getPropertyValue, getPropertyValues, setObject, setObject, setParentPropertyName, setParentValueHolder, setPropertyValues, setPropertyValues, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VariantValueHolder
public VariantValueHolder(int javaDataType)
throws UnsupportedDataTypeException
- Constructs a new VariantValueHolder for the given data type.
- Throws:
UnsupportedDataTypeException
- if given an invalid data type- See Also:
for list of supported data types
setPropertyValue
public void setPropertyValue(java.lang.String propertyName,
java.lang.Object newValue)
throws ModelException
- Sets the current value (propertyName is ignored).
Fires a StateChanged event to any listeners.
- Specified by:
setPropertyValue
in interface ValueHolder
- Overrides:
setPropertyValue
in class ObjectValueHolder
- Throws:
ModelException
getJavaDataType
public int getJavaDataType(java.lang.String propertyName)
throws ModelException
- Returns the java data type (propertyName is ignored)
- Specified by:
getJavaDataType
in interface ValueHolder
- Overrides:
getJavaDataType
in class ObjectValueHolder
- Returns:
- always returns DataTypes.TYPE_UNDEFINED (propertyName is ignored)
- Throws:
ModelException
toString
public java.lang.String toString()
- Returns a string representation of this object. This contains
the object identity and state information.
- Overrides:
toString
in class ObjectValueHolder
- Returns:
- a string representation of this object
Copyright © 2007 Martin T Phelan. All Rights Reserved.