com.vaadin.ui
Class Grid.EditorFieldFactory

java.lang.Object
  extended by com.vaadin.data.fieldgroup.DefaultFieldGroupFieldFactory
      extended by com.vaadin.ui.Grid.EditorFieldFactory
All Implemented Interfaces:
FieldGroupFieldFactory, java.io.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
protected Grid.EditorFieldFactory()
           
 
Method Summary
protected  AbstractSelect createCompatibleSelect(java.lang.Class<? extends AbstractSelect> fieldType)
           
<T extends Field>
T
createField(java.lang.Class<?> type, java.lang.Class<T> fieldType)
          Creates a field based on the data type that we want to edit
static Grid.EditorFieldFactory get()
          Returns the singleton instance
protected  void populateWithEnumData(AbstractSelect select, java.lang.Class<? extends java.lang.Enum> enumClass)
          Populates the given select with all the enums in the given Enum class.
 
Methods inherited from class com.vaadin.data.fieldgroup.DefaultFieldGroupFieldFactory
anyField, anySelect, createAbstractTextField, createBooleanField, createDefaultField, createRichTextArea
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grid.EditorFieldFactory

protected Grid.EditorFieldFactory()
Method Detail

get

public static Grid.EditorFieldFactory get()
Returns the singleton instance

Returns:
the singleton instance

createField

public <T extends Field> T createField(java.lang.Class<?> type,
                                       java.lang.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 interface FieldGroupFieldFactory
Overrides:
createField in class DefaultFieldGroupFieldFactory
Parameters:
type - The type that we want to edit using the field
fieldType - The type of field we want to create. If set to Field 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(java.lang.Class<? extends AbstractSelect> fieldType)
Overrides:
createCompatibleSelect in class DefaultFieldGroupFieldFactory

populateWithEnumData

protected void populateWithEnumData(AbstractSelect select,
                                    java.lang.Class<? extends java.lang.Enum> enumClass)
Description copied from class: DefaultFieldGroupFieldFactory
Populates the given select with all the enums in the given Enum class. Uses Enum.toString() for caption.

Overrides:
populateWithEnumData in class DefaultFieldGroupFieldFactory
Parameters:
select - The select to populate
enumClass - The Enum class to use


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.