Interface Property<T>
-
- Type Parameters:
T- type of values of the property
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
Field<T>,Property.Transactional<T>
- All Known Implementing Classes:
AbstractField,AbstractProperty,AbstractSelect,AbstractTextField,CheckBox,ColumnProperty,ComboBox,CustomField,DateField,Form,GeneratedPropertyContainer.GeneratedProperty,InlineDateField,Label,ListSelect,MethodProperty,NativeSelect,NestedMethodProperty,ObjectProperty,OptionGroup,PasswordField,PopupDateField,ProgressBar,ProgressIndicator,PropertyFormatter,RichTextArea,Select,Slider,Table,TextArea,TextField,TextFileProperty,TransactionalPropertyWrapper,Tree,TreeTable,TwinColSelect
@Deprecated public interface Property<T> extends Serializable
Deprecated.The
Propertyis 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
Propertyalso defines the eventsReadOnlyStatusChangeEventandValueChangeEvent, and the associatedlistenerandnotifierinterfaces.The
Property.Viewerinterface should be used to attach the Property to an external data source. This way the value in the data source can be inspected using thePropertyinterface.The
Property.editorinterface should be implemented if the value needs to be changed through the implementing class.- Since:
- 3.0
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceProperty.EditorDeprecated.static classProperty.ReadOnlyExceptionDeprecated.static interfaceProperty.ReadOnlyStatusChangeEventDeprecated.static interfaceProperty.ReadOnlyStatusChangeListenerDeprecated.static interfaceProperty.ReadOnlyStatusChangeNotifierDeprecated.static interfaceProperty.Transactional<T>Deprecated.static interfaceProperty.ValueChangeEventDeprecated.static interfaceProperty.ValueChangeListenerDeprecated.static interfaceProperty.ValueChangeNotifierDeprecated.static interfaceProperty.ViewerDeprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Class<? extends T>getType()Deprecated.Returns the type of the Property.TgetValue()Deprecated.Gets the value stored in the Property.booleanisReadOnly()Deprecated.Tests if the Property is in read-only mode.voidsetReadOnly(boolean newStatus)Deprecated.Sets the Property's read-only mode to the specified status.voidsetValue(T newValue)Deprecated.Sets the value of the Property.
-
-
-
Method Detail
-
getValue
T getValue()
Deprecated.Gets the value stored in the Property. The returned object is compatible with the class returned by getType().- Returns:
- the value stored in the Property
-
setValue
void setValue(T newValue) throws Property.ReadOnlyException
Deprecated.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
Note : Since Vaadin 7.0, setting the value of a non-String property as a String is no longer supported.Property.ReadOnlyExceptionin this function.- Parameters:
newValue- New value of the Property. This should be assignable to the type returned by getType- Throws:
Property.ReadOnlyException- if the object is in read-only mode
-
getType
Class<? extends T> getType()
Deprecated.Returns the type of the Property. The methodsgetValueandsetValuemust be compatible with this type: one must be able to safely cast the value returned fromgetValueto the given type and pass any variable assignable to this type as an argument tosetValue.- Returns:
- type of the Property
-
isReadOnly
boolean isReadOnly()
Deprecated.Tests if the Property is in read-only mode. In read-only mode calls to the methodsetValuewill throwReadOnlyExceptionand will not modify the value of the Property.- Returns:
trueif the Property is in read-only mode,falseif it's not
-
setReadOnly
void setReadOnly(boolean newStatus)
Deprecated.Sets the Property's read-only mode to the specified status. This functionality is optional, but all properties must implement theisReadOnlymode query correctly.- Parameters:
newStatus- new read-only status of the Property
-
-