| org.millstone.base.data.Property
All known Subclasses: org.millstone.base.data.util.IndexedContainer, org.millstone.examples.features.PropertyPanel, org.millstone.examples.Login, org.millstone.examples.gogame.Go, org.millstone.base.ui.AbstractField, org.millstone.base.data.util.ObjectProperty, org.millstone.base.ui.Label, org.millstone.examples.features.FeatureBrowser, org.millstone.base.data.util.MethodProperty, org.millstone.examples.features.FeatureForm,
Property | public interface Property (Code) | | Property is a simple data object that contains one typed value. This
interface contains methods to inspect and modify the stored value and its
type, and the object's read-only state.
Property also defines the events ReadOnlyStatusChangeEvent and
ValueChangeEvent, and the associated listener and notifier interfaces.
The Property.Viewer interface should be used to attach the Property to
an external data source. This way the value in the data source can be
inspected using the Property interface.
The Property.editor interface should be implemented if the value needs to
be changed through the implementing class.
author: IT Mill Ltd version: 3.1.1 since: 3.0 |
Inner Class :public interface Viewer | |
Inner Class :public interface ValueChangeEvent | |
Inner Class :public interface ValueChangeListener | |
Inner Class :public interface ValueChangeNotifier | |
Inner Class :public interface ReadOnlyStatusChangeEvent | |
Inner Class :public interface ReadOnlyStatusChangeListener | |
Inner Class :public interface ReadOnlyStatusChangeNotifier | |
Method Summary | |
public Class | getType() Returns the type of the Property. | public Object | getValue() Gets the value stored in the Property. | public boolean | isReadOnly() Tests if the Property is in read-only mode. | public void | setReadOnly(boolean newStatus) Sets the Property's read-only mode to the specified status. | public void | setValue(Object newValue) Sets the value of the Property.
Implementing this functionality is optional. | public String | toString() Returns the value of the Property in human readable textual format. |
getType | public Class getType()(Code) | | Returns the type of the Property. 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 |
setReadOnly | public void setReadOnly(boolean newStatus)(Code) | | Sets the Property's read-only mode to the specified status.
This functionality is optional, but all properties must implement
the isReadOnly() mode query correctly.
Parameters: newStatus - new read-only status of the Property |
setValue | public void setValue(Object newValue) throws Property.ReadOnlyException, Property.ConversionException(Code) | | Sets the value of the Property.
Implementing this functionality is optional. If the functionality
is missing, one should declare the Property to be in read-only mode
and throw Property.ReadOnlyException in this function.
It is not required, but highly recommended to support setting
the value also as a String in addition to the native
type of the Property (as given by the getType method).
If the String conversion fails or is unsupported, the
method should throw Property.ConversionException. The
string conversion should at least understand the format returned by
the toString() method of the Property.
Parameters: newValue - New value of the Property. This should be assignableto the type returned by getType , but also String typeshould be supported throws: Property.ReadOnlyException - if the object is in read-onlymode throws: Property.ConversionException - if newValue can'tbe converted into the Property's native type directly or throughString |
toString | public String toString()(Code) | | Returns the value of the Property 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 theProperty |
|
|