com.smartgwt.client.widgets.form.fields
Class TextItem

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.core.RefDataClass
              extended by com.smartgwt.client.widgets.form.fields.FormItem
                  extended by com.smartgwt.client.widgets.form.fields.TextItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasTitleHoverHandlers
Direct Known Subclasses:
PasswordItem, SpinnerItem, TimeItem, UploadItem

public class TextItem
extends FormItem

FormItem for managing a text field.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
TextItem()
           
TextItem(com.google.gwt.core.client.JavaScriptObject jsObj)
           
TextItem(java.lang.String name)
           
TextItem(java.lang.String name, java.lang.String title)
           
 
Method Summary
 CharacterCasing getCharacterCasing()
          Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue(int).
 int getHeight()
          Default height for text items.
 java.lang.String getHint()
          Returns the hint text for this item.
 java.lang.String getKeyPressFilter()
          Sets a keypress filter regular expression to limit valid characters that can be entered by the user.
 java.lang.Integer getLength()
          if set, maximum number of characters for this field
static TextItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 java.lang.Boolean getSelectOnFocus()
          Allows the selectOnFocus behavior to be configured on a per-FormItem basis.
 java.lang.Boolean getShowHintInField()
          If showing hint for this form item, should it be shown within the field?
 java.lang.String getTextBoxStyle()
          Base CSS class name for this item's input element. NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
 int getWidth()
          Default width for fields.
 void setCharacterCasing(CharacterCasing characterCasing)
          Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue(int).
 void setHeight(int height)
          Default height for text items.
 void setKeyPressFilter(java.lang.String keyPressFilter)
          Sets a keypress filter regular expression to limit valid characters that can be entered by the user.
 void setLength(java.lang.Integer length)
          if set, maximum number of characters for this field
 void setSelectOnFocus(java.lang.Boolean selectOnFocus)
          Allows the selectOnFocus behavior to be configured on a per-FormItem basis.
 void setShowHintInField(java.lang.Boolean showHintInField)
          If showing hint for this form item, should it be shown within the field?
 void setTextBoxStyle(java.lang.String textBoxStyle)
          Base CSS class name for this item's input element. NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.
 void setWidth(int width)
          Default width for fields.
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addTitleHoverHandler, blurItem, disable, enable, focusInItem, getAccessKey, getAlign, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getCellStyle, getConfig, getCriteriaField, getCriterion, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getGlobalTabIndex, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getLeft, getName, getOperator, getPickerIconHeight, getPickerIconSrc, getPickerIconWidth, getPrompt, getRejectInvalidValueOnChange, getRequired, getRowSpan, getShouldSaveValue, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowTitle, getShowValueIconOnly, getStartRow, getSuppressValueIcon, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleOrientation, getTitleStyle, getTooltip, getTop, getType, getValidateOnChange, getValue, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getWrapTitle, hide, isCreated, isDisabled, isDrawn, redraw, setAccessKey, setAlign, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setCellStyle, setColSpan, setColSpan, setCriteriaField, setDateFormatter, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisplayField, setEditorType, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setFetchMissingValues, setFilterLocally, setGlobalTabIndex, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setName, setOperator, setOptionDataSource, setPickerIconHeight, setPickerIconSrc, setPickerIconWidth, setPrompt, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRowSpan, setShouldSaveValue, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowTitle, setShowValueIconOnly, setStartRow, setSuppressValueIcon, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleOrientation, setTitleStyle, setTooltip, setTop, setType, setValidateOnChange, setValidators, setValue, setValue, setValue, setValue, setValue, setValue, setValueField, setValueIconHeight, setValueIconLeftPadding, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWrapTitle, show, stopHover, updateState
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttributeAsIntArray, getAttributeAsMap, getAttributeAsObject, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

TextItem

public TextItem()

TextItem

public TextItem(com.google.gwt.core.client.JavaScriptObject jsObj)

TextItem

public TextItem(java.lang.String name)

TextItem

public TextItem(java.lang.String name,
                java.lang.String title)
Method Detail

getOrCreateRef

public static TextItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

setWidth

public void setWidth(int width)
Default width for fields.

Overrides:
setWidth in class FormItem
Parameters:
width - width Default value is 150

getWidth

public int getWidth()
Default width for fields.

Overrides:
getWidth in class FormItem
Returns:
int

setHeight

public void setHeight(int height)
Default height for text items.

Overrides:
setHeight in class FormItem
Parameters:
height - height Default value is 19

getHeight

public int getHeight()
Default height for text items.

Overrides:
getHeight in class FormItem
Returns:
int

setTextBoxStyle

public void setTextBoxStyle(java.lang.String textBoxStyle)
Base CSS class name for this item's input element. NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Overrides:
setTextBoxStyle in class FormItem
Parameters:
textBoxStyle - textBoxStyle Default value is "textItem"

getTextBoxStyle

public java.lang.String getTextBoxStyle()
Base CSS class name for this item's input element. NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Overrides:
getTextBoxStyle in class FormItem
Returns:
String

setLength

public void setLength(java.lang.Integer length)
if set, maximum number of characters for this field

Parameters:
length - length Default value is null

getLength

public java.lang.Integer getLength()
if set, maximum number of characters for this field

Returns:
Integer

setSelectOnFocus

public void setSelectOnFocus(java.lang.Boolean selectOnFocus)
Allows the selectOnFocus behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.

Overrides:
setSelectOnFocus in class FormItem
Parameters:
selectOnFocus - selectOnFocus Default value is null

getSelectOnFocus

public java.lang.Boolean getSelectOnFocus()
Allows the selectOnFocus behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.

Overrides:
getSelectOnFocus in class FormItem
Returns:
Boolean

setShowHintInField

public void setShowHintInField(java.lang.Boolean showHintInField)
If showing hint for this form item, should it be shown within the field?

Note when this property is true, hintStyle is not used - class "textItemHint" is always used.

Note : This is an advanced setting

Parameters:
showHintInField - showHintInField Default value is null

getShowHintInField

public java.lang.Boolean getShowHintInField()
If showing hint for this form item, should it be shown within the field?

Note when this property is true, hintStyle is not used - class "textItemHint" is always used.

Returns:
Boolean

setCharacterCasing

public void setCharacterCasing(CharacterCasing characterCasing)
Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue(int).

Note : This is an advanced setting

Parameters:
characterCasing - characterCasing Default value is TextItem.DEFAULT

getCharacterCasing

public CharacterCasing getCharacterCasing()
Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue(int).

Returns:
CharacterCasing

setKeyPressFilter

public void setKeyPressFilter(java.lang.String keyPressFilter)
Sets a keypress filter regular expression to limit valid characters that can be entered by the user. If defined, keys that match the regular expression are allowed; all others are suppressed. The filter is applied after character casing, if defined. Set the keyPressFilter for this item

Note : This is an advanced setting

Parameters:
keyPressFilter - new keyPress filter for the item. Default value is null

getKeyPressFilter

public java.lang.String getKeyPressFilter()
Sets a keypress filter regular expression to limit valid characters that can be entered by the user. If defined, keys that match the regular expression are allowed; all others are suppressed. The filter is applied after character casing, if defined.

Returns:
String

getHint

public java.lang.String getHint()
Returns the hint text for this item. Default implementation returns hint, or null if there is no hint to show.

Overrides:
getHint in class FormItem
Returns:
HTML to show as the hint for the item