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 protectedEditorFieldFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSelectcreateCompatibleSelect(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.EditorFieldFactoryget()Returns the singleton instanceprotected voidpopulateWithEnumData(AbstractSelect select, Class<? extends Enum> enumClass)Populates the given select with all the enums in the givenEnumclass.-
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:FieldGroupFieldFactoryCreates a field based on the data type that we want to edit- Specified by:
createFieldin interfaceFieldGroupFieldFactory- Overrides:
createFieldin classDefaultFieldGroupFieldFactory- Parameters:
type- The type that we want to edit using the fieldfieldType- The type of field we want to create. If set toFieldthen 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:
createCompatibleSelectin classDefaultFieldGroupFieldFactory
-
populateWithEnumData
protected void populateWithEnumData(AbstractSelect select, Class<? extends Enum> enumClass)
Description copied from class:DefaultFieldGroupFieldFactoryPopulates the given select with all the enums in the givenEnumclass. UsesEnum.toString() for caption.- Overrides:
populateWithEnumDatain classDefaultFieldGroupFieldFactory- Parameters:
select- The select to populateenumClass- The Enum class to use
-
-