|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.data.util.AbstractProperty<T>
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.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
Constructor Summary | |
---|---|
ObjectProperty(T value)
Creates a new instance of ObjectProperty with the given value. |
|
ObjectProperty(T value,
java.lang.Class<T> type)
Creates a new instance of ObjectProperty with the given value and type. |
|
ObjectProperty(T value,
java.lang.Class<T> type,
boolean readOnly)
Creates a new instance of ObjectProperty with the given value, type and read-only mode status. |
Method Summary | |
---|---|
java.lang.Class<T> |
getType()
Returns the type of the ObjectProperty. |
T |
getValue()
Gets the value stored in the Property. |
void |
setValue(T newValue)
Sets the value of the property. |
Methods inherited from class com.vaadin.data.util.AbstractProperty |
---|
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireReadOnlyStatusChange, fireValueChange, getListeners, isReadOnly, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, 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(T value, java.lang.Class<T> type)
value
- the Initial value of the Property.type
- the type of the value. The value must be assignable to given
type.public ObjectProperty(T value, java.lang.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 java.lang.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(T newValue) throws Property.ReadOnlyException
newValue
- the New value of the property.
Property.ReadOnlyException
- if the object is in
read-only mode
Property.ReadOnlyException
- if the object is in read-only mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |