T - type of values of the propertyHasValue, ValueProvider, Setter, see Binder@Deprecated public interface Property<T> extends Serializable
The 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.
The 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.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Property.Editor
Deprecated.
|
static class |
Property.ReadOnlyException
Deprecated.
|
static interface |
Property.ReadOnlyStatusChangeEvent
Deprecated.
|
static interface |
Property.ReadOnlyStatusChangeListener
Deprecated.
|
static interface |
Property.ReadOnlyStatusChangeNotifier
Deprecated.
|
static interface |
Property.Transactional<T>
Deprecated.
|
static interface |
Property.ValueChangeEvent
Deprecated.
|
static interface |
Property.ValueChangeListener
Deprecated.
|
static interface |
Property.ValueChangeNotifier
Deprecated.
|
static interface |
Property.Viewer
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends T> |
getType()
Deprecated.
Returns the type of the Property.
|
T |
getValue()
Deprecated.
Gets the value stored in the Property.
|
boolean |
isReadOnly()
Deprecated.
Tests if the Property is in read-only mode.
|
void |
setReadOnly(boolean newStatus)
Deprecated.
Sets the Property's read-only mode to the specified status.
|
void |
setValue(T newValue)
Deprecated.
Sets the value of the Property.
|
T getValue()
void setValue(T newValue) throws Property.ReadOnlyException
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.
newValue - New value of the Property. This should be assignable to the
type returned by getTypeProperty.ReadOnlyException - if the object is in read-only modeClass<? extends T> getType()
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.boolean isReadOnly()
setValue will throw
ReadOnlyException and will not modify the value of the
Property.true if the Property is in read-only mode,
false if it's notvoid setReadOnly(boolean newStatus)
isReadOnly mode query correctly.newStatus - new read-only status of the PropertyCopyright © 2019 Vaadin Ltd. All rights reserved.