LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyFormFieldBase

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyFieldItem
          extended by leon.view.LyPanel
              extended by leon.view.LyFormFieldBase
All Implemented Interfaces:
LyGetConstraintInterface, LyGetControllerInterface, LyGetIdInterface, LyPdfInterface, LySetControllerInterface, LySetEditableInterface, LySetEnabledInterface, LySetHiddenInterface, LySetOptionalInterface, LySetStateInterface, LySetWaitingInterface, LyUpdateViewContentInterface
Direct Known Subclasses:
LyFormField

public abstract class LyFormFieldBase
extends LyPanel
implements LyGetIdInterface, LySetEditableInterface, LySetOptionalInterface, LySetEnabledInterface, LySetStateInterface, LySetHiddenInterface, LyGetControllerInterface, LySetControllerInterface, LyGetConstraintInterface

The LyFormFieldBase class is a generated Java implementation that corresponds to the element FIELD of the descriptive grammar of the views (views.dtd). <FIELD> : Field A field is contained in a form and allows to show or to input application data. It is principally made up of a label (optional) and an input field depending of the type of the data (text, number, date, color...). It is possible to associate a tool bar and a help entry to this field

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

Nested Class Summary
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
static short STATE_ERROR
           
static short STATE_NORMAL
          Possible values for attribute 'state'.
static short STATE_WARNING
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyFormFieldBase(java.lang.String id)
          Constructor with all required attributes.
 
Method Summary
 LyComponent cloneComponent()
          Method for cloning a component.
 LyCaption getCaption()
          Get sub-component Caption.
 LyConstraint getConstraint()
          Get sub-component Constraint.
 java.lang.String getController()
          Gets value of controller.
 LyFieldItem getFieldItem()
          Get sub-component FieldItem.
 LyFieldUnit getFieldUnit()
          Get sub-component FieldUnit.
 java.lang.String getId()
          Gets value of id.
 java.lang.String getMessage()
          Gets value of message.
 LyRelation getRelation()
          Get sub-component Relation.
static short getshort(java.lang.String token)
          Utility method to get state value from a string.
 short getState()
          Gets value of state.
 LyFormField getTemplate()
          Gets value of template.
 LyTip getTip()
          Get sub-component Tip.
 LyToolBar getToolBar()
          Get sub-component ToolBar.
 boolean isCheckBox()
          Checks if value of attribute checkBox is set.
 boolean isChecked()
          Checks if value of attribute checked is set.
 boolean isEditable()
          Checks if value of attribute editable is set.
 boolean isEnabled()
          Checks if value of attribute enabled is set.
 boolean isHidden()
          Checks if value of attribute hidden is set.
 boolean isNeedCheck()
          Checks if value of attribute needCheck is set.
 boolean isOptional()
          Checks if value of attribute optional is set.
 boolean isValid()
          Checks if value of attribute valid is set.
 void setCaption(LyCaption caption)
          Sets sub-component caption.
 void setCheckBox(boolean checkBox)
          Initializes attribute checkBox to the given value.
 void setChecked(boolean checked)
          Sets attribute checked 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 setEnabled(boolean enabled)
          Sets attribute enabled to the given value.
 void setFieldItem(LyFieldItem fieldItem)
          Sets sub-component fieldItem.
 void setFieldUnit(LyFieldUnit fieldUnit)
          Sets sub-component fieldUnit.
 void setHidden(boolean hidden)
          Sets attribute hidden to the given value.
 void setMessage(java.lang.String message)
          Sets attribute message to the given value.
 void setNeedCheck(boolean needCheck)
          Initializes attribute needCheck to the given value.
 void setOptional(boolean optional)
          Sets attribute optional to the given value.
 void setRelation(LyRelation relation)
          Sets sub-component relation.
 void setState(short state)
          Sets attribute state to the given value.
 void setTemplate(LyFormField template)
          Initializes attribute template to the given value.
 void setTip(LyTip tip)
          Sets sub-component tip.
 void setToolBar(LyToolBar toolBar)
          Sets sub-component toolBar.
 void setValid(boolean valid)
          Initializes attribute valid 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

STATE_NORMAL

public static final short STATE_NORMAL
Possible values for attribute 'state'.

See Also:
Constant Field Values

STATE_ERROR

public static final short STATE_ERROR
See Also:
Constant Field Values

STATE_WARNING

public static final short STATE_WARNING
See Also:
Constant Field Values
Constructor Detail

LyFormFieldBase

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

Parameters:
id - Identifier of the form.
Method Detail

getshort

public static final short getshort(java.lang.String token)
Utility method to get state value from a string.

Parameters:
token - Token string
Returns:
short 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 LyFormField 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.

isOptional

public boolean isOptional()
Checks if value of attribute optional is set.

Returns:
true if optional is set, false otherwise.

isEnabled

public boolean isEnabled()
Checks if value of attribute enabled is set.

Returns:
true if enabled is set, false otherwise.

isValid

public boolean isValid()
Checks if value of attribute valid is set.

Returns:
true if valid is set, false otherwise.

isCheckBox

public boolean isCheckBox()
Checks if value of attribute checkBox is set.

Returns:
true if checkBox is set, false otherwise.

isChecked

public boolean isChecked()
Checks if value of attribute checked is set.

Returns:
true if checked is set, false otherwise.

isNeedCheck

public boolean isNeedCheck()
Checks if value of attribute needCheck is set.

Returns:
true if needCheck is set, false otherwise.

getState

public short getState()
Gets value of state.

Returns:
value of state.

getMessage

public java.lang.String getMessage()
Gets value of message.

Returns:
value of message.

isHidden

public boolean isHidden()
Checks if value of attribute hidden is set.

Returns:
true if hidden is set, false otherwise.

getController

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

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

getCaption

public LyCaption getCaption()
Get sub-component Caption.

Returns:
sub-component Caption.

getFieldItem

public LyFieldItem getFieldItem()
Get sub-component FieldItem.

Returns:
sub-component FieldItem.

getToolBar

public LyToolBar getToolBar()
Get sub-component ToolBar.

Returns:
sub-component ToolBar.

getConstraint

public LyConstraint getConstraint()
Get sub-component Constraint.

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

getTip

public LyTip getTip()
Get sub-component Tip.

Returns:
sub-component Tip.

getRelation

public LyRelation getRelation()
Get sub-component Relation.

Returns:
sub-component Relation.

getFieldUnit

public LyFieldUnit getFieldUnit()
Get sub-component FieldUnit.

Returns:
sub-component FieldUnit.

setTemplate

public void setTemplate(LyFormField 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.

setOptional

public void setOptional(boolean optional)
Sets attribute optional to the given value.

Specified by:
setOptional in interface LySetOptionalInterface
Parameters:
optional - Boolean indicating if attribute optional is set or unset.

setEnabled

public void setEnabled(boolean enabled)
Sets attribute enabled to the given value.

Specified by:
setEnabled in interface LySetEnabledInterface
Parameters:
enabled - Boolean indicating if attribute enabled is set or unset.

setValid

public void setValid(boolean valid)
Initializes attribute valid to the given value.

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

setCheckBox

public void setCheckBox(boolean checkBox)
Initializes attribute checkBox to the given value.

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

setChecked

public void setChecked(boolean checked)
Sets attribute checked to the given value.

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

setNeedCheck

public void setNeedCheck(boolean needCheck)
Initializes attribute needCheck to the given value.

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

setState

public void setState(short state)
Sets attribute state to the given value.

Specified by:
setState in interface LySetStateInterface
Parameters:
state - New value of state.
Throws:
java.lang.IllegalArgumentException - if state parameter is null.

setMessage

public void setMessage(java.lang.String message)
Sets attribute message to the given value.

Parameters:
message - New value of message.

setHidden

public void setHidden(boolean hidden)
Sets attribute hidden to the given value.

Specified by:
setHidden in interface LySetHiddenInterface
Parameters:
hidden - Boolean indicating if attribute hidden is set or unset.

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)

setCaption

public void setCaption(LyCaption caption)
Sets sub-component caption.

Parameters:
caption - New value of caption

setFieldItem

public void setFieldItem(LyFieldItem fieldItem)
Sets sub-component fieldItem.

Parameters:
fieldItem - New value of fieldItem

setToolBar

public void setToolBar(LyToolBar toolBar)
Sets sub-component toolBar.

Parameters:
toolBar - New value of toolBar

setConstraint

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

Parameters:
constraint - New value of constraint

setTip

public void setTip(LyTip tip)
Sets sub-component tip.

Parameters:
tip - New value of tip

setRelation

public void setRelation(LyRelation relation)
Sets sub-component relation.

Parameters:
relation - New value of relation

setFieldUnit

public void setFieldUnit(LyFieldUnit fieldUnit)
Sets sub-component fieldUnit.

Parameters:
fieldUnit - New value of fieldUnit

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