|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.data.util.AbstractProperty
com.vaadin.data.util.ObjectProperty<T>
public class ObjectProperty<T>
A simple data object containing one typed value. This class is a
straightforward implementation of the the Property
interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.vaadin.data.util.AbstractProperty |
|---|
AbstractProperty.ReadOnlyStatusChangeEvent |
| Nested classes/interfaces inherited from interface com.vaadin.data.Property |
|---|
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Constructor Summary | |
|---|---|
ObjectProperty(Object value,
Class<T> type)
Creates a new instance of ObjectProperty with the given value and type. |
|
ObjectProperty(Object value,
Class<T> type,
boolean readOnly)
Creates a new instance of ObjectProperty with the given value, type and read-only mode status. |
|
ObjectProperty(T value)
Creates a new instance of ObjectProperty with the given value. |
|
| Method Summary | |
|---|---|
Class<T> |
getType()
Returns the type of the ObjectProperty. |
T |
getValue()
Gets the value stored in the Property. |
void |
setValue(Object newValue)
Sets the value of the property. |
| Methods inherited from class com.vaadin.data.util.AbstractProperty |
|---|
addListener, addListener, fireReadOnlyStatusChange, fireValueChange, getListeners, isReadOnly, removeListener, removeListener, setReadOnly, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectProperty(T value)
value - the Initial value of the Property.
public ObjectProperty(Object value,
Class<T> type)
setValue(Object).
value - the Initial value of the Property.type - the type of the value. The value must be assignable to given
type.
public ObjectProperty(Object value,
Class<T> type,
boolean readOnly)
ObjectProperty(Object, Class).
value - the Initial value of the property.type - the type of the value. value must be assignable
to this type.readOnly - Sets the read-only mode.| Method Detail |
|---|
public final Class<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.
public T getValue()
public void setValue(Object newValue)
throws Property.ReadOnlyException,
Property.ConversionException
String if either String is directly assignable
to property type, or the type class contains a string constructor.
newValue - the New value of the property.
Property.ReadOnlyException - if the object is in
read-only mode
Property.ConversionException - if the newValue can't
be converted into the Property's native type directly or through
String
Property.ReadOnlyException - if the object is in read-only mode
Property.ConversionException - if newValue can't be converted into the Property's native
type directly or through String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||