LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsText

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.LyStrutsText
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalText, LyViewComponent, LyFreeInterface, LySetLabelInterface, LyWebComponent

public class LyStrutsText
extends LyStrutsFieldItem
implements LyGraphicalText

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

TEXT: Input Field of Text Type
An input field of Text type allows displaying a graphical input or text consultation component. It does not comprise any element. It is possible to specify if the text should be hidden, if it should respect a given format, if it can be divided into several lines and the maximum number of characters that it can contain.

See Also:
LyText

Field Summary
static java.lang.String __VERSION
           
static boolean USE_LABEL_FOR_NON_EDITABLE_TEXT
          Indicates whether non editable text must be displayed as labels.
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsText(LyText text)
          Class constructor of a Text object for the struts target.
 
Method Summary
 int getTextHeight()
          Returns the height of the text component.
 int getTextWidth()
          Returns the width of the text component.
 boolean isEditable()
          Indicates if the field item is editable.
 void setEditable(boolean editable)
           
 void setLabel(java.lang.String label)
          (non-Javadoc).
 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, 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

USE_LABEL_FOR_NON_EDITABLE_TEXT

public static boolean USE_LABEL_FOR_NON_EDITABLE_TEXT
Indicates whether non editable text must be displayed as labels.

Constructor Detail

LyStrutsText

public LyStrutsText(LyText text)
Class constructor of a Text object for the struts target.

Parameters:
text - the generic Text defined for every type of view targets
Method Detail

isEditable

public boolean isEditable()
Description copied from class: LyStrutsFieldItem
Indicates if the field item is editable.

Overrides:
isEditable in class LyStrutsFieldItem
Returns:
true if it is editable, false otherwise

setEditable

public void setEditable(boolean editable)

setLabel

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

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

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

getTextWidth

public int getTextWidth()
Returns the width of the text component. If a fixed width must be used, result is a positive integer. If a minimum width must be used, result is a negative integer.


getTextHeight

public int getTextHeight()
Returns the height of the text component.


(c) January 2013 - W4 S.A.

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