@Deprecated public class TextFileProperty extends AbstractProperty<String>
ValueChangeListeners are supported, but only fire when
setValue(Object) is explicitly called. ReadOnlyStatusChangeListeners
are supported but only fire when setReadOnly(boolean) is explicitly called.AbstractProperty.ReadOnlyStatusChangeEventProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer| Constructor and Description |
|---|
TextFileProperty(File file)
Deprecated.
Wrap given file with property interface.
|
TextFileProperty(File file,
Charset charset)
Deprecated.
Wrap the given file with the property interface and specify character
set.
|
| Modifier and Type | Method and Description |
|---|---|
Class<String> |
getType()
Deprecated.
Returns the type of the Property.
|
String |
getValue()
Deprecated.
Gets the value stored in the Property.
|
boolean |
isReadOnly()
Deprecated.
Tests if the Property is in read-only mode.
|
void |
setValue(String newValue)
Deprecated.
Sets the value of the Property.
|
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireReadOnlyStatusChange, fireValueChange, getListeners, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, setReadOnlypublic TextFileProperty(File file)
file - File to be wrapped.public TextFileProperty(File file, Charset charset)
file - File to be wrapped.charset - Charset to be used for reading and writing the file.public Class<String> getType()
PropertygetValue 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.public String getValue()
Propertypublic boolean isReadOnly()
AbstractPropertysetValue will throw
ReadOnlyException and will not modify the value of the
Property.
Override for additional restrictions on what is considered a read-only
property.isReadOnly in interface Property<String>isReadOnly in class AbstractProperty<String>true if the Property is in read-only mode,
false if it's notpublic void setValue(String newValue) throws Property.ReadOnlyException
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.
newValue - New value of the Property. This should be assignable to the
type returned by getTypeProperty.ReadOnlyException - if the object is in read-only modeCopyright © 2019 Vaadin Ltd. All rights reserved.