LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control.form.builder
Class LyFormFieldBuilder

java.lang.Object
  extended by leon.control.builder.LyBuilder
      extended by leon.control.form.builder.LyFormFieldBuilder
Direct Known Subclasses:
LyFieldConsultBuilder

public abstract class LyFormFieldBuilder
extends LyBuilder

This builder creates a form field.

See Also:
LyFormController

Field Summary
static java.lang.String __VERSION
          File version
static int DEFAULT_TRANSVERSE_ICON_WIDTH
          Default size for Transverse icon (actions)
static java.lang.String FORM_FIELD_COMPOSITION_SEP
          Separator used to build form field identifiers in composition fields.
 
Constructor Summary
LyFormFieldBuilder(LyController parent)
          Default constructor.
 
Method Summary
 LyComponent build()
          Builds the view component.
 LyFieldItem buildArray()
          Build a field item for an array fieldInfo.
 LyFieldItem buildArray(LyArrayFieldInfo arrayField)
          Build a field item for an array fieldInfo.
abstract  LyFieldItem buildChoice()
          Build a field item for a choice fieldInfo.
abstract  LyFieldItem buildDate()
          Build a field item for a date fieldInfo.
 LyFieldItem buildFieldItem()
          Build a field item for a given fieldInfo.
 LyFieldItem buildFieldItem(LyFieldInfo fieldInfo)
          Build a field item for a given fieldInfo.
abstract  LyFieldItem buildFile()
          Build a field item for a file fieldInfo.
 LyFormField buildFormField(boolean editable)
          Build a form field for a given fieldInfo.
 LyFormField buildFormField(LyFieldInfo fieldInfo, boolean editable)
          Build a form field for a given fieldInfo.
 LyFieldItem buildInternalFieldItem(LyFieldInfo fieldInfo)
          Build a fieldItem for the given fieldInfo
abstract  LyFieldItem buildNumber()
          Build a field item for a number fieldInfo.
abstract  LyFieldItem buildRelation()
          Build a field item for a relation fieldInfo.
abstract  LyFieldItem buildStruct()
          Build a field item for a struct fieldInfo.
abstract  LyFieldItem buildText()
          Build a field item for a text fieldInfo.
 LyTool buildTool(LyAction action, boolean enable, java.lang.String parameter, java.lang.String iconSizeInfo)
          Builds a tool description for a specified action.
 LyToolBar buildToolBar()
          Build a toolbar for a given fieldInfo.
 LyToolBar buildToolBar(LyFieldInfo fieldInfo, LyInfoDataList<LyAction,LyClassInfo> actions)
          Builds the toolbar for the given field and list of actions.
 LyToolBar buildToolBar(LyInfoDataList<LyAction,LyClassInfo> actions)
          Builds the toolbar for the given relation field and list of actions.
 LyFieldItem buildValueLabel()
          Build a fieldItem for a fieldinfo to present its value.
 LyConstraint getCaptionConstraint(LyFormField formField)
          Get caption constraint.
 LyConstraint getFieldConstraint(LyFormField formField)
          Get field constraint.
 
Methods inherited from class leon.control.builder.LyBuilder
buildComponent, getComponent, getParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values

DEFAULT_TRANSVERSE_ICON_WIDTH

public static int DEFAULT_TRANSVERSE_ICON_WIDTH
Default size for Transverse icon (actions)


FORM_FIELD_COMPOSITION_SEP

public static final java.lang.String FORM_FIELD_COMPOSITION_SEP
Separator used to build form field identifiers in composition fields.

See Also:
Constant Field Values
Constructor Detail

LyFormFieldBuilder

public LyFormFieldBuilder(LyController parent)
Default constructor.

Parameters:
parent - parent controller
Method Detail

build

public LyComponent build()
Builds the view component.

Specified by:
build in class LyBuilder
Returns:
the view Component

buildFormField

public LyFormField buildFormField(LyFieldInfo fieldInfo,
                                  boolean editable)
Build a form field for a given fieldInfo.

Parameters:
fieldInfo - the fieldInfo corresponding to the built form field
editable - indicates whether the form field must be editable or not
Returns:
the form field corresponding to the fieldInfo

buildFormField

public LyFormField buildFormField(boolean editable)
Build a form field for a given fieldInfo.

Parameters:
editable - indicates whether the form field must be editable or not
Returns:
the form field corresponding to the fieldInfo

getCaptionConstraint

public LyConstraint getCaptionConstraint(LyFormField formField)
Get caption constraint.

Parameters:
formField - the formfield associated with the fieldInfo
Returns:
the constraint for the caption

getFieldConstraint

public LyConstraint getFieldConstraint(LyFormField formField)
Get field constraint.

Parameters:
formField - the formfield associated with the fieldInfo
Returns:
the constraint for the caption

buildFieldItem

public LyFieldItem buildFieldItem(LyFieldInfo fieldInfo)
Build a field item for a given fieldInfo.

Parameters:
fieldInfo - the fieldInfo corresponding to the built field item
Returns:
the field item corresponding to the fieldInfo

buildFieldItem

public LyFieldItem buildFieldItem()
Build a field item for a given fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildInternalFieldItem

public LyFieldItem buildInternalFieldItem(LyFieldInfo fieldInfo)
Build a fieldItem for the given fieldInfo

Parameters:
fieldInfo - a fieldInfo
Returns:
the resulting fieldItem

buildText

public abstract LyFieldItem buildText()
Build a field item for a text fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildDate

public abstract LyFieldItem buildDate()
Build a field item for a date fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildNumber

public abstract LyFieldItem buildNumber()
Build a field item for a number fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildStruct

public abstract LyFieldItem buildStruct()
Build a field item for a struct fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildRelation

public abstract LyFieldItem buildRelation()
Build a field item for a relation fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildChoice

public abstract LyFieldItem buildChoice()
Build a field item for a choice fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildFile

public abstract LyFieldItem buildFile()
Build a field item for a file fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildArray

public LyFieldItem buildArray(LyArrayFieldInfo arrayField)
Build a field item for an array fieldInfo.

Parameters:
arrayField - the array fieldInfo corresponding to the built field item
Returns:
the field item corresponding to the fieldInfo

buildArray

public LyFieldItem buildArray()
Build a field item for an array fieldInfo.

Returns:
the field item corresponding to the fieldInfo

buildValueLabel

public LyFieldItem buildValueLabel()
Build a fieldItem for a fieldinfo to present its value.

Returns:
the field item corresponding to the fieldInfo

buildToolBar

public LyToolBar buildToolBar()
Build a toolbar for a given fieldInfo. The built toolbar is added to the form field corresponding to the given fieldInfo

Returns:
the toolbar for the given fieldInfo

buildToolBar

public LyToolBar buildToolBar(LyFieldInfo fieldInfo,
                              LyInfoDataList<LyAction,LyClassInfo> actions)
Builds the toolbar for the given field and list of actions.

Parameters:
fieldInfo - the field
actions - List of pairs (action, classInfo)
Returns:
the toolbar for the given field

buildToolBar

public LyToolBar buildToolBar(LyInfoDataList<LyAction,LyClassInfo> actions)
Builds the toolbar for the given relation field and list of actions.

Parameters:
actions - List of pairs (action, classInfo)
Returns:
the toolbar for the given relation field

buildTool

public LyTool buildTool(LyAction action,
                        boolean enable,
                        java.lang.String parameter,
                        java.lang.String iconSizeInfo)
Builds a tool description for a specified action.

Parameters:
action - the action for the tool
enable - enabled state for the tool
parameter - parameters for the associated action
iconSizeInfo - size of the associated icon
Returns:
the tool

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com