LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsNumber

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.struts.LyStrutsFieldItem
              extended by leon.view.web.struts.LyStrutsNumber
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalNumber, LyViewComponent, LyFreeInterface, LySetLabelInterface, LySetNumberInterface, LyWebComponent

public class LyStrutsNumber
extends LyStrutsFieldItem
implements LyGraphicalNumber

This class implements the Number object (as described in the dtd) for web viewer.

NUMBER: Input Field of Number Type
An input field of Number type allows displaying a graphical component allowing to input or to consult a number value. It does not comprise any element. It is possible to specify the minimum and the maximum value, the incrementation step, the number of decimals and the unit.

See Also:
LyNumber

Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsNumber(LyNumber number)
          Class constructor of a Number object for the struts target.
 
Method Summary
 java.lang.String getDisplayableLabel(java.lang.String label, char decimalSeparator)
          Gets the displayable label for this number.
 void initialize()
          Initialization method.
 void setContent()
          Sets the content of the number component.
 void setDecimals(int decimals)
          Updates attribute decimals to the given value.
 void setFormat(java.lang.String format)
          Updates attribute format to the given value.
 void setLabel(java.lang.String label)
          (non-Javadoc).
 void setPitch(double pitch)
          Updates attribute pitch to the given value.
 void setVMax(double vMax)
          Sets the maximum value.
 void setVMin(double vMin)
          Updates attribute vMin to the given value.
 void writeHtml(LyWebPageWriter pw)
          Write HTML description corresponding to this component.
 
Methods inherited from class leon.view.web.struts.LyStrutsFieldItem
canDisabled, getCaption, getController, getFieldItem, getForm, getFormField, getFormName, getHtmlForm, getId, isEditable, isNetscape, isOptional, needCheck
 
Methods inherited from class leon.view.web.LyWebObject
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, free, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getScrollHeightForSplitter, getUrl, getWebViewManager, refresh, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, getBounds, getChildrenBounds, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.graphic.LyGraphicalComponent
free, getViewComponent
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyStrutsNumber

public LyStrutsNumber(LyNumber number)
Class constructor of a Number object for the struts target.

Parameters:
number - the generic Number defined for every type of view targets.
Method Detail

initialize

public void initialize()
Initialization method.
Sets button images with default images, the maximum number of chars with a default value and the label, min, max and decimals with the number generic component values.


setLabel

public void setLabel(java.lang.String label)
Description copied from class: LyStrutsFieldItem
(non-Javadoc).

Specified by:
setLabel in interface LyGraphicalNumber
Specified by:
setLabel in interface LySetLabelInterface
Overrides:
setLabel in class LyStrutsFieldItem
Parameters:
label - new label
See Also:
LySetLabelInterface.setLabel(java.lang.String)

setContent

public void setContent()
Sets the content of the number component.


writeHtml

public void writeHtml(LyWebPageWriter pw)
Description copied from interface: LyWebComponent
Write HTML description corresponding to this component.

Specified by:
writeHtml in interface LyWebComponent
Parameters:
pw - the page writer

getDisplayableLabel

public java.lang.String getDisplayableLabel(java.lang.String label,
                                            char decimalSeparator)
Gets the displayable label for this number.

Parameters:
label - the initial label
decimalSeparator - the decimal separator to be used
Returns:
the displayable label for this number

setFormat

public void setFormat(java.lang.String format)
Description copied from interface: LyGraphicalNumber
Updates attribute format to the given value.

Specified by:
setFormat in interface LyGraphicalNumber
Specified by:
setFormat in interface LySetNumberInterface
Parameters:
format - New value of format.

setVMin

public void setVMin(double vMin)
Description copied from interface: LyGraphicalNumber
Updates attribute vMin to the given value.

Specified by:
setVMin in interface LyGraphicalNumber
Specified by:
setVMin in interface LySetNumberInterface
Parameters:
vMin - New value of vMin.

setVMax

public void setVMax(double vMax)
Sets the maximum value.

Specified by:
setVMax in interface LyGraphicalNumber
Specified by:
setVMax in interface LySetNumberInterface
Parameters:
vMax - New value of maximum.

setPitch

public void setPitch(double pitch)
Description copied from interface: LyGraphicalNumber
Updates attribute pitch to the given value.

Specified by:
setPitch in interface LyGraphicalNumber
Specified by:
setPitch in interface LySetNumberInterface
Parameters:
pitch - New value of pitch.

setDecimals

public void setDecimals(int decimals)
Description copied from interface: LyGraphicalNumber
Updates attribute decimals to the given value.

Specified by:
setDecimals in interface LyGraphicalNumber
Specified by:
setDecimals in interface LySetNumberInterface
Parameters:
decimals - New value of decimals.

(c) January 2013 - W4 S.A.

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