org.vostok.vaadin.addon.button.spin
Interface SpinButton.Model<T>

Type Parameters:
T -
All Superinterfaces:
com.vaadin.data.Property<T>, java.io.Serializable
All Known Implementing Classes:
CalendarModel, ListModel, NumberModel
Enclosing class:
SpinButton

public static interface SpinButton.Model<T>
extends com.vaadin.data.Property<T>

Model defines how values must be displayed and managed.
Do Make difference between getValue, getRawValue, toObject :
Let's say model is for a list of country,

Default return type is String. Anyway, you can also use more complex type.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.data.Property
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeEvent, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer
 
Method Summary
 java.lang.Object getRawValue()
          return value for GetValue return internal data, for exemple index x while getRawValue return the actual value y for index x
 T init()
          Called from contructor
 T next()
          return next value but do not set current one.
 T prev()
          return previous value but do not set current one.
 java.lang.Object toObject()
          return a human formated representation of the current value.
 
Methods inherited from interface com.vaadin.data.Property
getType, getValue, isReadOnly, setReadOnly, setValue
 

Method Detail

init

T init()
Called from contructor

Returns:
initial value .

next

T next()
return next value but do not set current one.

Returns:
next valid value or null if none

prev

T prev()
return previous value but do not set current one.

Returns:
previous value or null if none

toObject

java.lang.Object toObject()
return a human formated representation of the current value.

Returns:
Component to direclty pack or String which will be display as a TextField through toString() method

getRawValue

java.lang.Object getRawValue()
return value for GetValue return internal data, for exemple index x while getRawValue return the actual value y for index x

Returns:
raw value from model
Since:
1.1