| |
|
| java.lang.Object org.millstone.base.data.util.ObjectProperty
Constructor Summary | |
public | ObjectProperty(Object value) Creates a new instance of ObjectProperty with the given value. | public | ObjectProperty(Object value, Class type) Creates a new instance of ObjectProperty with the given value and
type.
Parameters: value - Initial value of the Property Parameters: type - The type of the value. | public | ObjectProperty(Object value, Class type, boolean readOnly) Creates a new instance of ObjectProperty with the given value, type
and read-only mode status.
Parameters: value - Initial value of the property. Parameters: type - The type of the value. |
ObjectProperty | public ObjectProperty(Object value)(Code) | | Creates a new instance of ObjectProperty with the given value.
The type of the property is automatically initialized to be
the type of the given value.
Parameters: value - Initial value of the Property |
ObjectProperty | public ObjectProperty(Object value, Class type)(Code) | | Creates a new instance of ObjectProperty with the given value and
type.
Parameters: value - Initial value of the Property Parameters: type - The type of the value. The value must be assignable togiven type |
ObjectProperty | public ObjectProperty(Object value, Class type, boolean readOnly)(Code) | | Creates a new instance of ObjectProperty with the given value, type
and read-only mode status.
Parameters: value - Initial value of the property. Parameters: type - The type of the value. value must beassignable to this type. Parameters: readOnly - Sets the read-only mode. |
addListener | public void addListener(Property.ValueChangeListener listener)(Code) | | Registers a new value change listener for this ObjectProperty.
Parameters: listener - the new Listener to be registered |
getType | final public Class getType()(Code) | | Returns the type of the ObjectProperty. The methods
getValue and setValue must be compatible
with this type: one must be able to safely cast the value returned
from getValue to the given type and pass any variable
assignable to this type as an argument to setValue .
type of the Property |
getValue | public Object getValue()(Code) | | Gets the value stored in the Property.
the value stored in the Property |
isReadOnly | public boolean isReadOnly()(Code) | | Tests if the Property is in read-only mode. In read-only mode calls
to the method setValue will throw
ReadOnlyException s and will not modify the value of the
Property.
true if the Property is in read-only mode,false if it's not |
removeListener | public void removeListener(Property.ValueChangeListener listener)(Code) | | Remove a previously registered value change listener.
Parameters: listener - listener to be removed |
setReadOnly | public void setReadOnly(boolean newStatus)(Code) | | Sets the Property's read-only mode to the specified status.
Parameters: newStatus - new read-only status of the Property |
setValue | public void setValue(Object newValue) throws Property.ReadOnlyException, Property.ConversionException(Code) | | Set the value of the property. This method supports setting from
String s if either String is directly
assignable to property type, or the type class contains a string
constructor.
Parameters: newValue - New value of the property. Property.ReadOnlyException if the object is inread-only mode Property.ConversionException ifnewValue can't be converted into the Property's nativetype directly or through String |
toString | public String toString()(Code) | | Returns the value of the ObjectProperty in human readable textual
format. The return value should be assignable to the
setValue method if the Property is not in read-only
mode.
String representation of the value stored in theObjectProperty |
|
|
|