Package com.vaadin.v7.data.util
Class TextFileProperty
- java.lang.Object
-
- com.vaadin.v7.data.util.AbstractProperty<String>
-
- com.vaadin.v7.data.util.TextFileProperty
-
- All Implemented Interfaces:
Property<String>,Property.ReadOnlyStatusChangeNotifier,Property.ValueChangeNotifier,Serializable
@Deprecated public class TextFileProperty extends AbstractProperty<String>
Deprecated.As of 8.0, no replacement available.Property implementation for wrapping a text file. Supports reading and writing of a File from/to String.Property.ValueChangeListeners are supported, but only fire when setValue(Object) is explicitly called.Property.ReadOnlyStatusChangeListeners are supported but only fire when setReadOnly(boolean) is explicitly called.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractProperty
AbstractProperty.ReadOnlyStatusChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Class<String>getType()Deprecated.Returns the type of the Property.StringgetValue()Deprecated.Gets the value stored in the Property.booleanisReadOnly()Deprecated.Tests if the Property is in read-only mode.voidsetValue(String newValue)Deprecated.Sets the value of the Property.-
Methods inherited from class com.vaadin.v7.data.util.AbstractProperty
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireReadOnlyStatusChange, fireValueChange, getListeners, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, setReadOnly
-
-
-
-
Constructor Detail
-
TextFileProperty
public TextFileProperty(File file)
Deprecated.Wrap given file with property interface. Setting the file to null works, but getValue() will return null.- Parameters:
file- File to be wrapped.
-
TextFileProperty
public TextFileProperty(File file, Charset charset)
Deprecated.Wrap the given file with the property interface and specify character set. Setting the file to null works, but getValue() will return null.- Parameters:
file- File to be wrapped.charset- Charset to be used for reading and writing the file.
-
-
Method Detail
-
getType
public Class<String> getType()
Deprecated.Description copied from interface:PropertyReturns 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
-
getValue
public String getValue()
Deprecated.Description copied from interface:PropertyGets the value stored in the Property. The returned object is compatible with the class returned by getType().- Returns:
- the value stored in the Property
-
isReadOnly
public boolean isReadOnly()
Deprecated.Description copied from class:AbstractPropertyTests 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. Override for additional restrictions on what is considered a read-only property.- Specified by:
isReadOnlyin interfaceProperty<String>- Overrides:
isReadOnlyin classAbstractProperty<String>- Returns:
trueif the Property is in read-only mode,falseif it's not
-
setValue
public void setValue(String newValue) throws Property.ReadOnlyException
Deprecated.Description copied from interface:PropertySets 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
-
-