public class DefaultFieldGroupFieldFactory extends Object implements FieldGroupFieldFactory
FieldGroupFieldFactory
.The class is singleton, use get() method to get reference to the
instance.| Modifier and Type | Field and Description |
|---|---|
static Object |
CAPTION_PROPERTY_ID |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultFieldGroupFieldFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
anyField(Class<?> fieldType) |
protected boolean |
anySelect(Class<? extends Field> fieldType) |
protected <T extends AbstractTextField> |
createAbstractTextField(Class<T> fieldType) |
protected <T extends Field> |
createBooleanField(Class<T> fieldType) |
protected AbstractSelect |
createCompatibleSelect(Class<? extends AbstractSelect> fieldType) |
protected <T extends Field> |
createDefaultField(Class<?> type,
Class<T> fieldType)
Fallback when no specific field has been created.
|
<T extends Field> |
createField(Class<?> type,
Class<T> fieldType)
Creates a field based on the data type that we want to edit
|
protected RichTextArea |
createRichTextArea() |
static DefaultFieldGroupFieldFactory |
get()
Gets the singleton instance.
|
protected void |
populateWithEnumData(AbstractSelect select,
Class<? extends Enum> enumClass)
Populates the given select with all the enums in the given
Enum
class. |
public static final Object CAPTION_PROPERTY_ID
public static DefaultFieldGroupFieldFactory get()
public <T extends Field> T createField(Class<?> type, Class<T> fieldType)
FieldGroupFieldFactorycreateField in interface FieldGroupFieldFactorytype - The type that we want to edit using the fieldfieldType - The type of field we want to create. If set to Field
then any type of field is acceptedprotected RichTextArea createRichTextArea()
protected AbstractSelect createCompatibleSelect(Class<? extends AbstractSelect> fieldType)
protected boolean anyField(Class<?> fieldType)
fieldType - the type of the fieldprotected boolean anySelect(Class<? extends Field> fieldType)
fieldType - the type of the fieldprotected <T extends AbstractTextField> T createAbstractTextField(Class<T> fieldType)
protected <T extends Field> T createDefaultField(Class<?> type, Class<T> fieldType)
T - The type of field to createtype - The type of data that should be editedfieldType - The type of field to createprotected void populateWithEnumData(AbstractSelect select, Class<? extends Enum> enumClass)
Enum
class. Uses Enum.toString() for caption.select - The select to populateenumClass - The Enum class to useCopyright © 2016 Vaadin Ltd. All rights reserved.