com.sapportals.htmlb

Class TextEdit

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.EventValidationComponent
          extended bycom.sapportals.htmlb.TextEdit
All Implemented Interfaces:
IEventValidationComponent, IUserDataComponent, LabeledComponent

public class TextEdit
extends EventValidationComponent
implements IUserDataComponent, LabeledComponent

An editable TextArea

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
 
Constructor Summary
TextEdit(String name)
           
 
Method Summary
 int getCols()
           
 String getHeight()
          gets the height for this TextEdit
 int getRows()
          gets the visible number of rows for this TextEdit
 String getText()
           
 ForcedTextDirection getTextDirection()
          Gets the text direction for the component
 String getTooltip()
          gets the Tooltip for this TextEdit.
 String getUI()
          get get unique component ID for a TextEdit
 AbstractDataType getValueAsDataType()
          get the content of the TextEdit as a simple DataString Caution: ARRAY SUPPORT???
 String getWidth()
          gets the width for this TextEdit
 TextWrapping getWrapping()
          get the wrapping mode of this text edit field
protected  void initFromPageContext(IPageContext pc, String baseId)
          internal use only.
 boolean isLabeled()
          checks if a label has been assigned to this component.
 boolean isValid()
           
 void setCols(int cols)
           
 void setHeight(String height)
          sets the height for this TextEdit
 void setLabeled(boolean isLabeled)
          notify the component that a label has been assigned to it.
 void setRows(int rows)
          sets the visible number of rows for this TextEdit
 void setText(String text)
          set the visible text for the TextEdit
 void setTextDirection(ForcedTextDirection textDirection)
          Sets the text direction for the component
 void setTooltip(String tooltip)
          sets the Tooltip for this TextEdit.
 void setValid(boolean isValid)
           
 void setWidth(String width)
          sets the width for this TextEdit
 void setWrapping(TextWrapping wrapping)
          sets the wrapping mode of this text edit field Possible values are HARD, SOFT or OFF.
 
Methods inherited from class com.sapportals.htmlb.EventValidationComponent
getAllValidators, getClientEvent, getClientEventMap, getErrorText, getServerEvent, getServerEventMap, getValidator, isDisabled, isEnabled, isRequiresValidation, renderJavascriptInterface, setClientEvent, setDisabled, setEnabled, setErrorText, setRequiresValidation, setServerEvent, setValidator
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, requiresForm, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values
Constructor Detail

TextEdit

public TextEdit(String name)
Method Detail

initFromPageContext

protected void initFromPageContext(IPageContext pc,
                                   String baseId)
Description copied from class: Component
internal use only. Components should override this method to analyse the parameters from the request object (via IPageContext) and set their internal data structures accordingly.

Overrides:
initFromPageContext in class Component
Parameters:
pc - the context, including the parameters
baseId - the prefix used for the component. (The result of a former RenderUtil.getIdForForm(rc, c);)

getCols

public int getCols()

setCols

public void setCols(int cols)

getRows

public int getRows()
gets the visible number of rows for this TextEdit

Returns:
the number of rows.

setRows

public void setRows(int rows)
sets the visible number of rows for this TextEdit

Parameters:
rows - the number of rows.

getWidth

public String getWidth()
gets the width for this TextEdit

Returns:
width.

setWidth

public void setWidth(String width)
sets the width for this TextEdit


getHeight

public String getHeight()
gets the height for this TextEdit

Returns:
height.

setHeight

public void setHeight(String height)
sets the height for this TextEdit


getText

public String getText()

getWrapping

public TextWrapping getWrapping()
get the wrapping mode of this text edit field

Returns:
the wrapping mode

setWrapping

public void setWrapping(TextWrapping wrapping)
sets the wrapping mode of this text edit field Possible values are HARD, SOFT or OFF. HARD will create line breaks within the entered text. SOFT will show a wrapped text without inserting line breaks. OFF deactivates wrapping.

Parameters:
wrapping - the wrapping mode

setText

public void setText(String text)
set the visible text for the TextEdit

Parameters:
text - the text to show

getTooltip

public String getTooltip()
gets the Tooltip for this TextEdit. Tooltips can not contain HTML coding.

Returns:
the tooltip text

setTooltip

public void setTooltip(String tooltip)
sets the Tooltip for this TextEdit. Tooltips can not contain HTML coding.

Parameters:
tooltip - the tooltip text

getUI

public String getUI()
get get unique component ID for a TextEdit

Specified by:
getUI in class Component
Returns:
the UI id for the TextEdit

getValueAsDataType

public AbstractDataType getValueAsDataType()
get the content of the TextEdit as a simple DataString Caution: ARRAY SUPPORT???

Specified by:
getValueAsDataType in interface IUserDataComponent
Returns:
a DataString containing the text

setLabeled

public void setLabeled(boolean isLabeled)
Description copied from interface: LabeledComponent
notify the component that a label has been assigned to it.

Specified by:
setLabeled in interface LabeledComponent

isLabeled

public boolean isLabeled()
Description copied from interface: LabeledComponent
checks if a label has been assigned to this component.

Specified by:
isLabeled in interface LabeledComponent

setValid

public void setValid(boolean isValid)

isValid

public boolean isValid()

getTextDirection

public ForcedTextDirection getTextDirection()
Gets the text direction for the component

Returns:
com.sapportals.htmlb.enum.ForcedTextDirection

setTextDirection

public void setTextDirection(ForcedTextDirection textDirection)
Sets the text direction for the component

Parameters:
textDirection - com.sapportals.htmlb.enum.ForcedTextDirection


Copyright 2006 SAP AG Complete Copyright Notice