LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyFormField

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

public class LyFormField
extends LyFormFieldBase

The LyFormField class implements generic behavior for the FIELD components as described in views.dtd regardless of the requested target (win, swing, html...). It represents a form field.

See Also:
LyComponent

Nested Class Summary
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyFormFieldBase
STATE_ERROR, STATE_NORMAL, STATE_WARNING
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyFormField(java.lang.String id)
          Constructor with all required attributes.
 
Method Summary
 void free()
          Free this component.
 int[] getBounds(LyComponent parentComponent)
          Returns the position and size of current component relatively to given component.
 boolean isValid()
          Deprecated. Use getState method
 void resetContent()
          Reset content of this form field.
 void setFocus()
          To give the focus to this formField.
 void setId(java.lang.String id)
          Sets id of this formField.
 void setState(short state)
          Sets attribute state to the given value.
 void setValid(boolean valid)
          Deprecated. Use setState method
 void setVisible(boolean status)
          Shows or hides the component/node.
 
Methods inherited from class leon.view.LyFormFieldBase
cloneComponent, getCaption, getConstraint, getController, getFieldItem, getFieldUnit, getId, getMessage, getRelation, getshort, getState, getTemplate, getTip, getToolBar, isCheckBox, isChecked, isEditable, isEnabled, isHidden, isNeedCheck, isOptional, setCaption, setCheckBox, setChecked, setConstraint, setController, setEditable, setEnabled, setFieldItem, setFieldUnit, setHidden, setMessage, setNeedCheck, setOptional, setRelation, setTemplate, setTip, setToolBar, writeXml
 
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, 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, 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, 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

LyFormField

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

Method Detail

isValid

public boolean isValid()
Deprecated. Use getState method

Checks if value of attribute valid is set.

Overrides:
isValid in class LyFormFieldBase
Returns:
true if valid is set, false otherwise.

setValid

public void setValid(boolean valid)
Deprecated. Use setState method

Sets attribute valid to the given value.

Overrides:
setValid in class LyFormFieldBase
Parameters:
valid - Boolean indicating if attribute valid is set or unset.

setState

public void setState(short state)
Sets attribute state to the given value. This method is overriden to allow states greater than STATE_WARNING.

Specified by:
setState in interface LySetStateInterface
Overrides:
setState in class LyFormFieldBase
Parameters:
state - New value of STATE_
Throws:
java.lang.IllegalArgumentException - if state is not a known value for this attribute.

resetContent

public void resetContent()
Reset content of this form field.


setId

public void setId(java.lang.String id)
Sets id of this formField.

Parameters:
id - New id of the formField.

setFocus

public void setFocus()
To give the focus to this formField.


setVisible

public void setVisible(boolean status)
Description copied from class: LyComponent
Shows or hides the component/node.

Overrides:
setVisible in class LyComponent
Parameters:
status - new visibility status
See Also:
LySetVisibleInterface.setVisible(boolean)

getBounds

public int[] getBounds(LyComponent parentComponent)
Returns the position and size of current component relatively to given component. Overridden to compute bounds for both caption and field item.

Overrides:
getBounds in class LyComponent
Parameters:
parentComponent - the component used to compute relative position of current component. If null, position of current component is computed with the top-left corner of the screen as the origin.
Returns:
an array of 4 integers (x position, y position, width, height) representing the position and size of current component.

free

public void free()
Free this component.

Overrides:
free in class LyFieldItem

(c) January 2013 - W4 S.A.

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