Package com.vaadin.featurepack.ui
Class FGrid.EditorFieldFactory
java.lang.Object
com.vaadin.featurepack.data.fieldgroup.DefaultFieldGroupFieldFactory
com.vaadin.featurepack.ui.FGrid.EditorFieldFactory
- All Implemented Interfaces:
FieldGroupFieldFactory,Serializable
- Enclosing class:
FGrid
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:
-
Field Summary
Fields inherited from class com.vaadin.featurepack.data.fieldgroup.DefaultFieldGroupFieldFactory
CAPTION_PROPERTY_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SelectcreateCompatibleSelect(Class<?> fieldType) <T extends Field>
TcreateField(Class<?> type, Class<T> fieldType) Creates a field based on the data type that we want to editstatic FGrid.EditorFieldFactoryget()Returns the singleton instanceprotected voidpopulateWithEnumData(Select select, Class<? extends Enum> enumClass) Populates the given select with all the enums in the givenEnumclass.Methods inherited from class com.vaadin.featurepack.data.fieldgroup.DefaultFieldGroupFieldFactory
anyField, anySelect, createAbstractTextField, createBooleanField, createDefaultField
-
Constructor Details
-
EditorFieldFactory
protected EditorFieldFactory()
-
-
Method Details
-
get
Returns the singleton instance- Returns:
- the singleton instance
-
createField
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
- Overrides:
createCompatibleSelectin classDefaultFieldGroupFieldFactory
-
populateWithEnumData
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
-