|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vostok.vaadin.addon.button.spin.CalendarModel
public class CalendarModel
A model to work on date / time.
though NumberModel can deal with date and time, this one provides finer control on date fields.
for format output
,
Serialized FormNested 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 |
Constructor Summary | |
---|---|
CalendarModel(java.util.Calendar start)
create a date model with no limit and a step of 1 day, default format to NumberModel.FORMAT_SIMPLEDATE |
|
CalendarModel(java.util.Calendar start,
java.util.Calendar max,
java.util.Calendar min,
int field,
int step,
java.lang.String format)
create a new date model with boundaries |
|
CalendarModel(java.util.Calendar start,
int field,
int step,
java.lang.String format)
create a date model increase of step on Calendar's field field |
Method Summary | |
---|---|
protected java.lang.String |
format(java.util.Calendar value)
|
com.vaadin.data.util.converter.Converter<java.lang.String,java.util.Date> |
getConverter()
calendarModel provide converter support but not logic. return null, must be overrided |
java.lang.String |
getHint()
return hint to dispay while in edition mode. |
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 |
java.lang.Class<? extends java.util.Date> |
getType()
|
java.util.Date |
getValue()
|
java.util.Date |
init()
Called from contructor |
boolean |
isReadOnly()
|
java.util.Date |
next()
return next value but do not set current one. |
java.util.Date |
prev()
return previous value but do not set current one. |
void |
setLocale(java.util.Locale locale)
Locale for toObject formating. |
void |
setReadOnly(boolean newStatus)
|
void |
setValue(java.util.Date newValue)
|
java.lang.Object |
toObject()
return a human formated representation of the current value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CalendarModel(java.util.Calendar start)
start
- starting dateNumberModel
public CalendarModel(java.util.Calendar start, int field, int step, java.lang.String format)
step
on Calendar's field field
start
- starting datefield
- Calendar field as Calendar
fieldsstep
- step into field
format
- output fomat, can be null. can use format from numberModel
NumberModel
,
Calendar
public CalendarModel(java.util.Calendar start, java.util.Calendar max, java.util.Calendar min, int field, int step, java.lang.String format)
start
- starting datemax
- maximum allowed date, null for nonemin
- minium allowed data, null for nonefield
- Calendar field as Calendar
fieldsstep
- step into field
format
- output fomat, can be null. can use format from numberModel
NumberModel
,
Calendar
Method Detail |
---|
public void setLocale(java.util.Locale locale)
locale
- public java.util.Date init()
SpinButton.Model
init
in interface SpinButton.Model<java.util.Date>
public java.util.Date next()
SpinButton.Model
next
in interface SpinButton.Model<java.util.Date>
null
if nonepublic java.util.Date prev()
SpinButton.Model
prev
in interface SpinButton.Model<java.util.Date>
null
if noneprotected java.lang.String format(java.util.Calendar value)
value
-
String
date formated according to localepublic java.util.Date getValue()
getValue
in interface com.vaadin.data.Property<java.util.Date>
public void setValue(java.util.Date newValue) throws com.vaadin.data.Property.ReadOnlyException
setValue
in interface com.vaadin.data.Property<java.util.Date>
com.vaadin.data.Property.ReadOnlyException
public java.lang.Class<? extends java.util.Date> getType()
getType
in interface com.vaadin.data.Property<java.util.Date>
public boolean isReadOnly()
isReadOnly
in interface com.vaadin.data.Property<java.util.Date>
public void setReadOnly(boolean newStatus)
setReadOnly
in interface com.vaadin.data.Property<java.util.Date>
public java.lang.Object toObject()
SpinButton.Model
toObject
in interface SpinButton.Model<java.util.Date>
Component
to direclty pack or String
which will be display as a TextField through toString() methodpublic java.lang.Object getRawValue()
SpinButton.Model
getRawValue
in interface SpinButton.Model<java.util.Date>
public com.vaadin.data.util.converter.Converter<java.lang.String,java.util.Date> getConverter()
getConverter
in interface SpinButton.Editable<java.util.Date>
null
always null. Must be overridedpublic java.lang.String getHint()
SpinButton.Editable
getHint
in interface SpinButton.Editable<java.util.Date>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |