LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyFormBase

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyFieldItem
          extended by leon.view.LyPanel
              extended by leon.view.LyFormBase
All Implemented Interfaces:
LyGetConstraintInterface, LyGetControllerInterface, LyGetIdInterface, LyPdfInterface, LySetControllerInterface, LySetEditableInterface, LySetWaitingInterface, LyUpdateViewContentInterface
Direct Known Subclasses:
LyForm

public abstract class LyFormBase
extends LyPanel
implements LyGetIdInterface, LySetEditableInterface, LyGetControllerInterface, LySetControllerInterface, LyGetConstraintInterface

The LyFormBase class is a generated Java implementation that corresponds to the element FORM of the descriptive grammar of the views (views.dtd). <FORM> : Form A form allows showing a set of fields. This type of component is used to allow an application user to consult application data (non editable form) or else to input data (editable form). The default arrangement of the fields inside a form is based on a grid of two columns comprising as many lines as there are fields. The first column contains the labels of the fields and the second one contains the input fields.

See Also:
LyPanel, See also tag FORM of grammar leon_views.dtd.

Nested Class Summary
static class LyFormBase.Align
          Possible values for attribute 'align'.
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyFormBase(java.lang.String id)
          Constructor with all required attributes.
 
Method Summary
 void addFormField(LyFormField formField)
          Adds a sub-component formField.
 LyComponent cloneComponent()
          Method for cloning a component.
 LyFormBase.Align getAlign()
          Gets value of align.
static LyFormBase.Align getAlign(java.lang.String token)
          Utility method to get align value from a string.
 java.lang.String getColor()
          Gets value of color.
 LyConstraint getConstraint()
          Get sub-component Constraint.
 java.lang.String getController()
          Gets value of controller.
 java.lang.String getErrorColor()
          Gets value of errorColor.
 java.lang.String getFont()
          Gets value of font.
 java.lang.String getFontColor()
          Gets value of fontColor.
 LyFormField getFormField(int i)
          Get sub-component FormField of index i.
 int getFormFieldCount()
          Get sub-component FormField count.
 java.lang.String getId()
          Gets value of id.
 LyForm getTemplate()
          Gets value of template.
 java.lang.String getWarningColor()
          Gets value of warningColor.
 void insertFormField(LyFormField formField, int pos)
          Inserts a sub-component formField at given position.
 boolean isBorder()
          Checks if value of attribute border is set.
 boolean isDefaultColor()
          Checks whether the color attribute is valuated to the default value.
 boolean isDefaultErrorColor()
          Checks whether the errorColor attribute is valuated to the default value.
 boolean isDefaultFont()
          Checks whether the font attribute is valuated to the default value.
 boolean isDefaultFontColor()
          Checks whether the fontColor attribute is valuated to the default value.
 boolean isDefaultWarningColor()
          Checks whether the warningColor attribute is valuated to the default value.
 boolean isEditable()
          Checks if value of attribute editable is set.
 void setAlign(LyFormBase.Align align)
          Initializes attribute align to the given value.
 void setBorder(boolean border)
          Initializes attribute border to the given value.
 void setColor(java.lang.String color)
          Initializes attribute color to the given value.
 void setConstraint(LyConstraint constraint)
          Sets sub-component constraint.
 void setController(java.lang.String controller)
          Initializes attribute controller to the given value.
 void setEditable(boolean editable)
          Sets attribute editable to the given value.
 void setErrorColor(java.lang.String errorColor)
          Initializes attribute errorColor to the given value.
 void setFont(java.lang.String font)
          Initializes attribute font to the given value.
 void setFontColor(java.lang.String fontColor)
          Initializes attribute fontColor to the given value.
 void setTemplate(LyForm template)
          Initializes attribute template to the given value.
 void setWarningColor(java.lang.String warningColor)
          Initializes attribute warningColor to the given value.
 void writeXml(java.io.PrintWriter pw, boolean debug)
          Method to rewrite XML corresponding to this component.
 
Methods inherited from class leon.view.LyPanel
generatePdf, getLastModified, isIdle, isScrollable, print, setIdle, setLastModified, setPopupMenu, setWaiting
 
Methods inherited from class leon.view.LyFieldItem
addBeanData, buildBean, free, getBean, getBeanComponent, getBeanData, getBeanDatas, getChild, getChildCount, getErrorMessage, getFieldValue, getValue, setBean, setBeanComponent, setBeanDatas, setFieldValue, setLabel, updateViewContent, validateInput
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, freeze, getBounds, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEnvironment, getEventFunctions, getIdCode, getInternalId, getInternalView, getInternalView, getLock, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, reset, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, setVisible, useEventDefaultFunction, writeXml
 
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
See Also:
Constant Field Values
Constructor Detail

LyFormBase

public LyFormBase(java.lang.String id)
Constructor with all required attributes.

Parameters:
id - Identifier of the form.
Method Detail

getAlign

public static final LyFormBase.Align getAlign(java.lang.String token)
Utility method to get align value from a string.

Parameters:
token - Token string
Returns:
Align value corresponding to this token

cloneComponent

public LyComponent cloneComponent()
Method for cloning a component.

Specified by:
cloneComponent in class LyComponent

getId

public java.lang.String getId()
Gets value of id.

Specified by:
getId in interface LyGetIdInterface
Overrides:
getId in class LyComponent
Returns:
value of id.

getTemplate

public LyForm getTemplate()
Gets value of template.

Returns:
value of template.

isEditable

public boolean isEditable()
Checks if value of attribute editable is set.

Returns:
true if editable is set, false otherwise.

getAlign

public LyFormBase.Align getAlign()
Gets value of align.

Returns:
value of align.

getController

public java.lang.String getController()
Gets value of controller.

Specified by:
getController in interface LyGetControllerInterface
Returns:
value of controller.

isBorder

public boolean isBorder()
Checks if value of attribute border is set.

Returns:
true if border is set, false otherwise.

getFont

public java.lang.String getFont()
Gets value of font.

Returns:
value of font.

isDefaultFont

public boolean isDefaultFont()
Checks whether the font attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getColor

public java.lang.String getColor()
Gets value of color.

Returns:
value of color.

isDefaultColor

public boolean isDefaultColor()
Checks whether the color attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getFontColor

public java.lang.String getFontColor()
Gets value of fontColor.

Returns:
value of fontColor.

isDefaultFontColor

public boolean isDefaultFontColor()
Checks whether the fontColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getWarningColor

public java.lang.String getWarningColor()
Gets value of warningColor.

Returns:
value of warningColor.

isDefaultWarningColor

public boolean isDefaultWarningColor()
Checks whether the warningColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getErrorColor

public java.lang.String getErrorColor()
Gets value of errorColor.

Returns:
value of errorColor.

isDefaultErrorColor

public boolean isDefaultErrorColor()
Checks whether the errorColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getFormField

public LyFormField getFormField(int i)
Get sub-component FormField of index i.

Parameters:
i - the index of the FormField to get.
Returns:
sub-component FormField of index i.

getFormFieldCount

public int getFormFieldCount()
Get sub-component FormField count.

Returns:
sub-component FormField count.

getConstraint

public LyConstraint getConstraint()
Get sub-component Constraint.

Specified by:
getConstraint in interface LyGetConstraintInterface
Returns:
sub-component Constraint.

setTemplate

public void setTemplate(LyForm template)
Initializes attribute template to the given value.

Parameters:
template - New value of template.

setEditable

public void setEditable(boolean editable)
Sets attribute editable to the given value.

Specified by:
setEditable in interface LySetEditableInterface
Parameters:
editable - Boolean indicating if attribute editable is set or unset.

setAlign

public void setAlign(LyFormBase.Align align)
Initializes attribute align to the given value.

Parameters:
align - New value of align.
Throws:
java.lang.IllegalArgumentException - if align parameter is null.

setController

public void setController(java.lang.String controller)
Initializes attribute controller to the given value.

Specified by:
setController in interface LySetControllerInterface
Parameters:
controller - New value of controller.
See Also:
LySetControllerInterface.setController(java.lang.String)

setBorder

public void setBorder(boolean border)
Initializes attribute border to the given value.

Parameters:
border - Boolean indicating if attribute border is set or unset.

setFont

public void setFont(java.lang.String font)
Initializes attribute font to the given value.

Parameters:
font - New value of font.

setColor

public void setColor(java.lang.String color)
Initializes attribute color to the given value.

Parameters:
color - New value of color.

setFontColor

public void setFontColor(java.lang.String fontColor)
Initializes attribute fontColor to the given value.

Parameters:
fontColor - New value of fontColor.

setWarningColor

public void setWarningColor(java.lang.String warningColor)
Initializes attribute warningColor to the given value.

Parameters:
warningColor - New value of warningColor.

setErrorColor

public void setErrorColor(java.lang.String errorColor)
Initializes attribute errorColor to the given value.

Parameters:
errorColor - New value of errorColor.

addFormField

public void addFormField(LyFormField formField)
Adds a sub-component formField.

Parameters:
formField - The formField to add to formFields list.

insertFormField

public void insertFormField(LyFormField formField,
                            int pos)
Inserts a sub-component formField at given position.

Parameters:
formField - The formField to add to formFields list.
pos - Position where the sub-component is inserted.

setConstraint

public void setConstraint(LyConstraint constraint)
Sets sub-component constraint.

Parameters:
constraint - New value of constraint

writeXml

public void writeXml(java.io.PrintWriter pw,
                     boolean debug)
Method to rewrite XML corresponding to this component.

Specified by:
writeXml in class LyComponent
Parameters:
pw - the printWriter on which the XML is written.
debug - true if debug mode (full dump).

(c) January 2013 - W4 S.A.

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