LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control.builder
Class LyFormBuilder

java.lang.Object
  extended by leon.control.builder.LyBuilder
      extended by leon.control.builder.LyAreaBuilder
          extended by leon.control.builder.LyFormBuilder
Direct Known Subclasses:
LyConsultBuilder, LySimpleFilterBuilder

public abstract class LyFormBuilder
extends LyAreaBuilder

This builder creates a form view.

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 boolean SHOW_CONTEXT_AREA
          Position of context area
 
Constructor Summary
LyFormBuilder(LyController parent)
          Default constructor.
 
Method Summary
 LyComponent build()
          Builds the view component.
 LyFieldItem buildArray(LyArrayFieldInfo arrayField, java.lang.Object value)
          Build a field item for an array fieldInfo.
 LyFieldItem buildChoice(LyChoiceFieldInfo choiceField, java.lang.Object value)
          Build a field item for a choice fieldInfo.
 LyFieldItem buildDate(LyDateFieldInfo dateField, java.lang.Object value)
          Build a field item for a date fieldInfo.
 LyFieldItem buildFieldItem(LyFieldInfo fieldInfo)
          Build a field item for a given fieldInfo.
 LyFieldItem buildFieldItem(LyFieldInfo fieldInfo, java.lang.Object value)
          Build a field item for a given fieldInfo.
 LyFieldItem buildFile(LyFileFieldInfo fileField, java.lang.Object value)
          Build a field item for a file fieldInfo.
 LyFormField buildFormField(LyFieldInfo fieldInfo, boolean editable)
          Build a form field for a given fieldInfo.
 LyFieldItem buildNumber(LyNumberFieldInfo numberField, java.lang.Object value)
          Build a field item for a number fieldInfo.
 LyFieldItem buildRelation(LyRelationFieldInfo relationField, java.lang.Object value)
          Build a field item for a relation fieldInfo.
 LyFieldItem buildStruct(LyStructFieldInfo structField, java.lang.Object value)
          Build a field item for an struct fieldInfo.
 LyFieldItem buildText(LyTextFieldInfo textField, java.lang.Object value)
          Build a field item for a text fieldInfo.
 LyToolBar buildToolBar(LyFieldInfo fieldInfo)
          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.
 LyFieldItem buildValueLabel(LyFieldInfo fieldInfo, java.lang.Object value)
          Build a fieldItem for a fieldinfo to present its value.
 void completeToolBarForContext(LyToolBar toolBar)
          Complete the toolbar with the form context.
 LyConstraint getCaptionConstraint(LyFieldInfo fieldInfo, LyFormField formField)
          Get caption constraint.
 LyConstraint getFieldConstraint(LyFieldInfo fieldInfo, LyFormField formField)
          Get field constraint.
static LyConstraintBase.Fill getFill(LyFieldConstraint.Fill fill)
          Convert a LyFieldConstraint to a LyConstraint.Fill
static LyConstraintBase.HAlign getHAlign(LyFieldConstraint.HAlign hAlign)
          Convert a LyFieldConstraint.HAlign to a LyConstraint.HAlign
static LyConstraintBase.VAlign getVAlign(LyFieldConstraint.VAlign vAlign)
          Convert a LyFieldConstraint.VAlign to a LyConstraint.VAlign
 
Methods inherited from class leon.control.builder.LyAreaBuilder
buildComponent, completeMenuBar, completeMessages, getRightLabel, setTitleBarParameters, updateSelectFile, updateTitleBar
 
Methods inherited from class leon.control.builder.LyBuilder
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)


SHOW_CONTEXT_AREA

public static boolean SHOW_CONTEXT_AREA
Position of context area

Constructor Detail

LyFormBuilder

public LyFormBuilder(LyController parent)
Default constructor.

Parameters:
parent - parent controller
Method Detail

getFill

public static LyConstraintBase.Fill getFill(LyFieldConstraint.Fill fill)
Convert a LyFieldConstraint to a LyConstraint.Fill

Parameters:
fill - the LyFieldConstraint
Returns:
the corresponding LyConstraint.Fill

getHAlign

public static LyConstraintBase.HAlign getHAlign(LyFieldConstraint.HAlign hAlign)
Convert a LyFieldConstraint.HAlign to a LyConstraint.HAlign

Parameters:
hAlign - source HAlign
Returns:
converted HAlign

getVAlign

public static LyConstraintBase.VAlign getVAlign(LyFieldConstraint.VAlign vAlign)
Convert a LyFieldConstraint.VAlign to a LyConstraint.VAlign

Parameters:
vAlign - source VAlign
Returns:
converted VAlign

build

public LyComponent build()
Builds the view component.

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

completeToolBarForContext

public void completeToolBarForContext(LyToolBar toolBar)
Complete the toolbar with the form context. If there is a context on the form, three buttons are added to the toolbar : previous, next and selection.

Parameters:
toolBar - the toolbar to complete

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

getCaptionConstraint

public LyConstraint getCaptionConstraint(LyFieldInfo fieldInfo,
                                         LyFormField formField)
Get caption constraint.

Parameters:
fieldInfo - the fieldInfo
formField - the formField
Returns:
the computed constraint

getFieldConstraint

public LyConstraint getFieldConstraint(LyFieldInfo fieldInfo,
                                       LyFormField formField)
Get field constraint.

Parameters:
fieldInfo - the fieldInfo
formField - the formField
Returns:
the computed constraint

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(LyFieldInfo fieldInfo,
                                  java.lang.Object value)
Build a field item for a given fieldInfo.

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

buildText

public LyFieldItem buildText(LyTextFieldInfo textField,
                             java.lang.Object value)
Build a field item for a text fieldInfo.

Parameters:
textField - the text fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildDate

public LyFieldItem buildDate(LyDateFieldInfo dateField,
                             java.lang.Object value)
Build a field item for a date fieldInfo.

Parameters:
dateField - the date fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildNumber

public LyFieldItem buildNumber(LyNumberFieldInfo numberField,
                               java.lang.Object value)
Build a field item for a number fieldInfo.

Parameters:
numberField - the number fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildRelation

public LyFieldItem buildRelation(LyRelationFieldInfo relationField,
                                 java.lang.Object value)
Build a field item for a relation fieldInfo.

Parameters:
relationField - the relation fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildChoice

public LyFieldItem buildChoice(LyChoiceFieldInfo choiceField,
                               java.lang.Object value)
Build a field item for a choice fieldInfo.

Parameters:
choiceField - the choice fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildFile

public LyFieldItem buildFile(LyFileFieldInfo fileField,
                             java.lang.Object value)
Build a field item for a file fieldInfo.

Parameters:
fileField - the file fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildArray

public LyFieldItem buildArray(LyArrayFieldInfo arrayField,
                              java.lang.Object value)
Build a field item for an array fieldInfo.

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

buildStruct

public LyFieldItem buildStruct(LyStructFieldInfo structField,
                               java.lang.Object value)
Build a field item for an struct fieldInfo.

Parameters:
structField - the struct fieldInfo corresponding to the built field item
value - the value of the field item
Returns:
the field item corresponding to the fieldInfo

buildValueLabel

public LyFieldItem buildValueLabel(LyFieldInfo fieldInfo,
                                   java.lang.Object value)
Build a fieldItem for a fieldinfo to present its value.

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

buildToolBar

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

Parameters:
fieldInfo - the fieldInfo corresponding to the built toolbar
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

(c) January 2013 - W4 S.A.

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