Package com.vaadin.ui
Class Grid.EditorFieldFactory
- java.lang.Object
-
- com.vaadin.data.fieldgroup.DefaultFieldGroupFieldFactory
-
- com.vaadin.ui.Grid.EditorFieldFactory
-
- All Implemented Interfaces:
FieldGroupFieldFactory
,Serializable
- Enclosing class:
- Grid
public static class Grid.EditorFieldFactory extends DefaultFieldGroupFieldFactory
Field factory used by default in the editor. Aims to fields of suitable type and with suitable size for use in the editor row.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.data.fieldgroup.DefaultFieldGroupFieldFactory
CAPTION_PROPERTY_ID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EditorFieldFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSelect
createCompatibleSelect(Class<? extends AbstractSelect> fieldType)
<T extends Field>
TcreateField(Class<?> type, Class<T> fieldType)
Creates a field based on the data type that we want to editstatic Grid.EditorFieldFactory
get()
Returns the singleton instanceprotected void
populateWithEnumData(AbstractSelect select, Class<? extends Enum> enumClass)
Populates the given select with all the enums in the givenEnum
class.-
Methods inherited from class com.vaadin.data.fieldgroup.DefaultFieldGroupFieldFactory
anyField, anySelect, createAbstractTextField, createBooleanField, createDefaultField, createRichTextArea
-
-
-
-
Method Detail
-
get
public static Grid.EditorFieldFactory get()
Returns the singleton instance- Returns:
- the singleton instance
-
createField
public <T extends Field> T createField(Class<?> type, Class<T> fieldType)
Description copied from interface:FieldGroupFieldFactory
Creates a field based on the data type that we want to edit- Specified by:
createField
in interfaceFieldGroupFieldFactory
- Overrides:
createField
in classDefaultFieldGroupFieldFactory
- Parameters:
type
- The type that we want to edit using the fieldfieldType
- The type of field we want to create. If set toField
then any type of field is accepted- Returns:
- A field that can be assigned to the given fieldType and that is capable of editing the given type of data
-
createCompatibleSelect
protected AbstractSelect createCompatibleSelect(Class<? extends AbstractSelect> fieldType)
- Overrides:
createCompatibleSelect
in classDefaultFieldGroupFieldFactory
-
populateWithEnumData
protected void populateWithEnumData(AbstractSelect select, Class<? extends Enum> enumClass)
Description copied from class:DefaultFieldGroupFieldFactory
Populates the given select with all the enums in the givenEnum
class. UsesEnum
.toString() for caption.- Overrides:
populateWithEnumData
in classDefaultFieldGroupFieldFactory
- Parameters:
select
- The select to populateenumClass
- The Enum class to use
-
-