|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vostok.vaadin.addon.button.spin.ListModel
public class ListModel
a model to display list of items.
Value refers to index into the list.
getValue / setValue
refers to list's index, getRawValue
refers to list[value], toObject
refers to list[value]. You can retur n your own return object by
overriding toObject
method.
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 |
Constructor Summary | |
---|---|
ListModel(java.lang.Object[] list)
create a new list model with index = 0 and loop = true |
|
ListModel(java.lang.Object[] list,
int start,
boolean loop)
create a new list model. |
Method Summary | |
---|---|
com.vaadin.data.util.converter.Converter<java.lang.String,java.lang.Integer> |
getConverter()
ListModel 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.lang.Integer> |
getType()
|
java.lang.Integer |
getValue()
|
java.lang.Integer |
init()
Called from contructor |
boolean |
isReadOnly()
|
java.lang.Integer |
next()
return next value but do not set current one. |
java.lang.Integer |
prev()
return previous value but do not set current one. |
void |
setReadOnly(boolean newStatus)
|
void |
setValue(java.lang.Integer 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 ListModel(java.lang.Object[] list, int start, boolean loop) throws java.lang.Exception
list
- list of item to display ; cannot be nullstart
- start index ; must be lower than list.length and at least 0loop
- true
if must loop through data, false
to stop at boundaries
java.lang.Exception
- on bad argumentpublic ListModel(java.lang.Object[] list) throws java.lang.Exception
list
-
java.lang.Exception
Method Detail |
---|
public java.lang.Integer init()
SpinButton.Model
init
in interface SpinButton.Model<java.lang.Integer>
public java.lang.Integer next()
SpinButton.Model
next
in interface SpinButton.Model<java.lang.Integer>
null
if nonepublic java.lang.Integer prev()
SpinButton.Model
prev
in interface SpinButton.Model<java.lang.Integer>
null
if nonepublic java.lang.Integer getValue()
getValue
in interface com.vaadin.data.Property<java.lang.Integer>
public void setValue(java.lang.Integer newValue) throws com.vaadin.data.Property.ReadOnlyException
setValue
in interface com.vaadin.data.Property<java.lang.Integer>
com.vaadin.data.Property.ReadOnlyException
public java.lang.Class<? extends java.lang.Integer> getType()
getType
in interface com.vaadin.data.Property<java.lang.Integer>
public boolean isReadOnly()
isReadOnly
in interface com.vaadin.data.Property<java.lang.Integer>
public void setReadOnly(boolean newStatus)
setReadOnly
in interface com.vaadin.data.Property<java.lang.Integer>
public java.lang.Object toObject()
SpinButton.Model
toObject
in interface SpinButton.Model<java.lang.Integer>
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.lang.Integer>
public java.lang.String getHint()
SpinButton.Editable
getHint
in interface SpinButton.Editable<java.lang.Integer>
public com.vaadin.data.util.converter.Converter<java.lang.String,java.lang.Integer> getConverter()
getConverter
in interface SpinButton.Editable<java.lang.Integer>
null
always null. Must be overrided
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |