public class TextAreaItem extends FormItem
<TEXTAREA> object)scClassNameid| Constructor and Description |
|---|
TextAreaItem() |
TextAreaItem(com.google.gwt.core.client.JavaScriptObject jsObj) |
TextAreaItem(java.lang.String name) |
TextAreaItem(java.lang.String name,
java.lang.String title) |
| Modifier and Type | Method and Description |
|---|---|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName. |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName. |
static void |
changePickerIconDefaults(FormItemIcon defaults) |
void |
deselectValue()
If this item currently has focus, clear the current selection.
|
void |
deselectValue(java.lang.Boolean start)
If this item currently has focus, clear the current selection.
|
java.lang.Boolean |
getChangeOnKeypress()
Should this form item fire its
change handler
(and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing
(and the value stored) on every keypress. |
java.lang.String |
getEnteredValue()
Returns the raw text value that currently appears in the text field, which can differ from
FormItem.getValue() in various cases - for example:
for items that constrain the value range, such as a DateItem with
enforceDate:true, or a ComboBoxItem with addUnknownValues:false for items with
a defined valueMap or edit value formatter and parser functions which converts display value to data value
while the item has focus if changeOnKeypress is false |
java.lang.Boolean |
getFormatOnBlur()
With
formatOnBlur enabled, this textAreaItem will format its value according to any specified static static formatter as long as the item does not have focus. |
int |
getHeight()
default height of this item
|
VerticalAlignment |
getIconVAlign()
Align icons with the top edge of text area icons by default.
|
java.lang.Integer |
getLength()
Return the length.
|
int |
getMinHeight()
Minimum valid height for this TextAreaItem in px.
|
static TextAreaItem |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.Boolean |
getPrintFullText()
When generating a print-view of the component containing this TextArea, should the form item expand to accommodate its
value? If set to false the text box not expand to fit its content in the print view, instead showing exactly as it does
in the live form, possibly with scrollbars.
|
int[] |
getSelectionRange()
For text-based items, this method returns the indices of the start/end of the current selection if the item currently
has the focus.
|
java.lang.Boolean |
getSelectOnClick()
Allows the
selectOnClick behavior to be configured
on a per-FormItem basis. |
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 to apply to this item's input element.
|
java.lang.String |
getValueAsString()
Return the value tracked by this form item.
|
int |
getWidth()
default width of this item
|
TextAreaWrap |
getWrap()
Text wrapping style.
|
void |
selectValue()
Put focus in this item and select the entire value.
|
void |
setChangeOnKeypress(java.lang.Boolean changeOnKeypress)
Should this form item fire its
change handler
(and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing
(and the value stored) on every keypress. |
static void |
setDefaultProperties(TextAreaItem textAreaItemProperties)
Class level method to set the default properties of this class.
|
void |
setFormatOnBlur(java.lang.Boolean formatOnBlur)
With
formatOnBlur enabled, this textAreaItem will format its value according to any specified static static formatter as long as the item does not have focus. |
void |
setHeight(int height)
default height of this item
|
void |
setIconVAlign(VerticalAlignment iconVAlign)
Align icons with the top edge of text area icons by default.
|
void |
setLength(java.lang.Integer length)
Set the length.
|
void |
setMinHeight(int minHeight)
Minimum valid height for this TextAreaItem in px.
|
void |
setPrintFullText(java.lang.Boolean printFullText)
When generating a print-view of the component containing this TextArea, should the form item expand to accommodate its
value? If set to false the text box not expand to fit its content in the print view, instead showing exactly as it does
in the live form, possibly with scrollbars.
|
void |
setSelectionRange(int start,
int end)
Puts focus into this form item and selects characters between the given indices.
|
void |
setSelectOnClick(java.lang.Boolean selectOnClick)
Allows the
selectOnClick behavior to be configured
on a per-FormItem basis. |
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 to apply to this item's input element.
|
void |
setWidth(int width)
default width of this item
|
void |
setWrap(TextAreaWrap wrap)
Text wrapping style.
|
_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPickerIconClickHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, asSGWTComponent, blurItem, canEditCriterion, clearValue, disable, enable, error, error, errorIfNotCreated, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanSelectText, getCanvasAutoChild, getCellHeight, getCellStyle, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDisabled, getDisableIconsOnReadOnly, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForm, getFormat, getFormItemAutoChild, getFullDataPath, getGlobalTabIndex, getHeightAsString, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIconWidth, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLoadingDisplayValue, getLocateItemBy, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionFilterContext, getOptionOperationId, getPageLeft, getPageRect, getPageTop, getPicker, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyDisplay, getReadOnlyTextBoxStyle, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getShouldSaveValue, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, getStopOnError, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueAsRecordList, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getVisibleHeight, getVisibleWidth, getWidthAsString, getWrapTitle, hasAdvancedCriteria, hide, hideIcon, invalidateDisplayValueCache, isCreated, isDisabled, isDrawn, isVisible, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setApplyHeightToTextBox, setAriaRole, setAriaState, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanEditOpaqueValues, setCanFocus, setCanSelectText, setCellHeight, setCellStyle, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setControlStyle, setCriteriaField, setCriterion, setCriterionGetter, setCriterionSetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisableIconsOnReadOnly, setDisplayField, setDisplayFormat, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setExportFormat, setFetchMissingValues, setFilterLocally, setFormat, setGlobalTabIndex, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconWidth, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setLeft, setLoadingDisplayValue, setLocateItemBy, setMultipleValueSeparator, setName, setNullProperty, setOperator, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyDisplay, setReadOnlyTextBoxStyle, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRowSpan, setSaveOnEnter, setScClassName, setShouldSaveValue, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, setStopOnError, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValueField, setValueFormatter, setValueHoverFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, showPicker, stopHover, storeValue, storeValue, updateState, validate, valueClippedgetRef, getRef, internalSetIDdoAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObjectequals, getJsObj, hashCode, setJavaScriptObject, setJsObjpublic TextAreaItem()
public TextAreaItem(com.google.gwt.core.client.JavaScriptObject jsObj)
public TextAreaItem(java.lang.String name)
public TextAreaItem(java.lang.String name,
java.lang.String title)
public static TextAreaItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
autoChildName.autoChildName - name of an AutoChild to customize the defaults for.defaults - Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsagepublic static void changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
autoChildName.autoChildName - name of an AutoChild to customize the defaults for.defaults - FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsagepublic static void changePickerIconDefaults(FormItemIcon defaults)
public void setChangeOnKeypress(java.lang.Boolean changeOnKeypress)
change handler
(and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing
(and the value stored) on every keypress. Note: If false, the value returned by getValue will not reflect the value displayed in the form
item element as long as focus is in the form item element.
setChangeOnKeypress in class FormItemchangeOnKeypress - Default value is truepublic java.lang.Boolean getChangeOnKeypress()
change handler
(and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing
(and the value stored) on every keypress. Note: If false, the value returned by getValue will not reflect the value displayed in the form
item element as long as focus is in the form item element.
getChangeOnKeypress in class FormItempublic void setFormatOnBlur(java.lang.Boolean formatOnBlur)
formatOnBlur enabled, this textAreaItem will format its value according to any specified static static formatter as long as the item does not have focus.
Once the user puts focus into the item the formatter will be removed. This provides a simply way for developers to show
a nicely formatted display value in a freeform text field, without the need for an explicit FormItem.formatEditorValue() and FormItem.parseEditorValue() pair.formatOnBlur - Default value is falsepublic java.lang.Boolean getFormatOnBlur()
formatOnBlur enabled, this textAreaItem will format its value according to any specified static static formatter as long as the item does not have focus.
Once the user puts focus into the item the formatter will be removed. This provides a simply way for developers to show
a nicely formatted display value in a freeform text field, without the need for an explicit FormItem.formatEditorValue() and FormItem.parseEditorValue() pair.public void setHeight(int height)
setHeight in class FormItemheight - Default value is 100Appearance overview and related methodspublic int getHeight()
getHeight in class FormItemAppearance overview and related methodspublic void setIconVAlign(VerticalAlignment iconVAlign)
setIconVAlign in class FormItemiconVAlign - Default value is Canvas.TOPpublic VerticalAlignment getIconVAlign()
getIconVAlign in class FormItempublic void setMinHeight(int minHeight)
height is less than this value, the text area will still
render at this height.minHeight - Default value is 16public int getMinHeight()
height is less than this value, the text area will still
render at this height.public void setPrintFullText(java.lang.Boolean printFullText)
printFullText - Default value is truePrinting overview and related methodspublic java.lang.Boolean getPrintFullText()
Printing overview and related methodspublic void setSelectOnClick(java.lang.Boolean selectOnClick)
selectOnClick behavior to be configured
on a per-FormItem basis. Normally all items in a form default to the value of selectOnClick.setSelectOnClick in class FormItemselectOnClick - Default value is nullFocus overview and related methodspublic java.lang.Boolean getSelectOnClick()
selectOnClick behavior to be configured
on a per-FormItem basis. Normally all items in a form default to the value of selectOnClick.getSelectOnClick in class FormItemFocus overview and related methodspublic void setSelectOnFocus(java.lang.Boolean selectOnFocus)
selectOnFocus behavior to be configured
on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.setSelectOnFocus in class FormItemselectOnFocus - Default value is nullFocus overview and related methodspublic java.lang.Boolean getSelectOnFocus()
selectOnFocus behavior to be configured
on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.getSelectOnFocus in class FormItemFocus overview and related methodspublic void setShowHintInField(java.lang.Boolean showHintInField)
CSS style for the hint is textBoxStyle with the suffix "Hint" appended to
it.
Note : This is an advanced setting
showHintInField - Default value is nullFormItem.setHint(java.lang.String),
Appearance overview and related methodspublic java.lang.Boolean getShowHintInField()
CSS style for the hint is textBoxStyle with the suffix "Hint" appended to
it.
FormItem.getHint(),
Appearance overview and related methodspublic void setTextBoxStyle(java.lang.String textBoxStyle)
CompoundFormItem_skinning discussion for special skinning considerations.setTextBoxStyle in class FormItemtextBoxStyle - See FormItemBaseStyle . Default value is "textItem"Appearance overview and related methodspublic java.lang.String getTextBoxStyle()
CompoundFormItem_skinning discussion for special skinning considerations.getTextBoxStyle in class FormItemFormItemBaseStyleAppearance overview and related methodspublic void setWidth(int width)
setWidth in class FormItemwidth - Default value is 150Appearance overview and related methodspublic int getWidth()
getWidth in class FormItemAppearance overview and related methodspublic void deselectValue()
public void deselectValue(java.lang.Boolean start)
start - By default the text insertion cursor will be moved to the end of the current value - pass in this parameter to move to
the start insteadpublic java.lang.String getEnteredValue()
FormItem.getValue() in various cases - for example: DateItem with
enforceDate:true, or a ComboBoxItem with addUnknownValues:falsechangeOnKeypress is false public int[] getSelectionRange()
In all browsers, clicking anywhere outside of the item causes the item to lose focus;
hence, in IE 6-9, this method will not work in other components' event handlers for certain events. For example, within
the click() handler of a button, this item will have already
lost focus, so in IE 6-9, this method will return null if called within the button's click() handler. One cross-browser
solution to this issue is to save the selection range for later in a mouseDown() or mouseOver() handler.
Notes:
setValue() or otherwise changing
the entered value invalidates the past
selection range.getValue(). The distinction is
particularly important for TextAreaItems because browsers normalize the
line endings in the <textarea> element's value. Internet Explorer 6, 7, and 8 convert line endings to
"\r\n" while other browsers convert line endings to "\n" as specified by the HTML5
standard.entered value. In IE 6-9, returns null if the
item does not have focus.public void selectValue()
public void setSelectionRange(int start,
int end)
start - selection starting character indexend - end of selection character indexpublic static void setDefaultProperties(TextAreaItem textAreaItemProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
textAreaItemProperties - properties that should be used as new defaults when instances of this class are createdpublic void setLength(java.lang.Integer length)
length - the lengthpublic java.lang.Integer getLength()
public void setWrap(TextAreaWrap wrap)
wrap - wrap Default value is TextAreaWrap.SOFTpublic TextAreaWrap getWrap()
public java.lang.String getValueAsString()