com.itmill.toolkit.ui
Class BaseFieldFactory

java.lang.Object
  extended by com.itmill.toolkit.ui.BaseFieldFactory
All Implemented Interfaces:
FieldFactory

public class BaseFieldFactory
extends Object
implements FieldFactory

Default implementation of the the following Field types are used by default:

Boolean: Button(switchMode:true).
Date: DateField(resolution: day).
Item: Form.
default field type: TextField.

Since:
3.1
Version:
5.3.0
Author:
IT Mill Ltd.

Constructor Summary
BaseFieldFactory()
           
 
Method Summary
 Field createField(Class type, Component uiContext)
          Creates the field based on type of data.
 Field createField(Container container, Object itemId, Object propertyId, Component uiContext)
          Creates a field based on the container item id and property id.
 Field createField(Item item, Object propertyId, Component uiContext)
          Creates the field based on the item and property id.
 Field createField(Property property, Component uiContext)
          Creates the field based on the datasource property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFieldFactory

public BaseFieldFactory()
Method Detail

createField

public Field createField(Class type,
                         Component uiContext)
Creates the field based on type of data.

Specified by:
createField in interface FieldFactory
Parameters:
type - the type of data presented in field.
uiContext - the context where the Field is presented.
Returns:
Field the field suitable for editing the specified data.
See Also:
FieldFactory.createField(Class, Component)

createField

public Field createField(Property property,
                         Component uiContext)
Creates the field based on the datasource property.

Specified by:
createField in interface FieldFactory
Parameters:
property - the property datasource.
uiContext - the component where the field is presented.
Returns:
Field the field suitable for editing the specified data.
See Also:
FieldFactory.createField(Property, Component)

createField

public Field createField(Item item,
                         Object propertyId,
                         Component uiContext)
Creates the field based on the item and property id.

Specified by:
createField in interface FieldFactory
Parameters:
item - the item where the property belongs to.
propertyId - the Id of the property.
uiContext - the component where the field is presented.
Returns:
Field the field suitable for editing the specified data.
See Also:
FieldFactory.createField(Item, Object, Component)

createField

public Field createField(Container container,
                         Object itemId,
                         Object propertyId,
                         Component uiContext)
Description copied from interface: FieldFactory
Creates a field based on the container item id and property id.

Specified by:
createField in interface FieldFactory
Parameters:
container - the Container where the property belongs to.
itemId - the item Id.
propertyId - the Id of the property.
uiContext - the component where the field is presented.
Returns:
Field the field suitable for editing the specified data.
See Also:
FieldFactory.createField(com.itmill.toolkit.data.Container, java.lang.Object, java.lang.Object, com.itmill.toolkit.ui.Component)


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.