|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.form.fields.FormItem
com.smartgwt.client.widgets.form.fields.TextAreaItem
public class TextAreaItem
Class for editable multi-line text areas (uses HTML <TEXTAREA>
object)
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
TextAreaItem()
|
|
TextAreaItem(JavaScriptObject jsObj)
|
|
TextAreaItem(java.lang.String name)
|
|
TextAreaItem(java.lang.String name,
java.lang.String title)
|
Method Summary | |
---|---|
void |
deselectValue()
If this item currently has focus, clear the current selection. |
void |
deselectValue(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 typed into this form 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 |
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(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. |
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. |
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 |
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. |
Methods inherited from class com.smartgwt.client.core.RefDataClass |
---|
getRef, getRef |
Methods inherited from class com.smartgwt.client.core.DataClass |
---|
doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, 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 |
Constructor Detail |
---|
public TextAreaItem()
public TextAreaItem(JavaScriptObject jsObj)
public TextAreaItem(java.lang.String name)
public TextAreaItem(java.lang.String name, java.lang.String title)
Method Detail |
---|
public static TextAreaItem getOrCreateRef(JavaScriptObject jsObj)
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.
changeOnKeypress
- changeOnKeypress 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.
public void setHeight(int height)
setHeight
in class FormItem
height
- height Default value is 100Appearance overview and related methods
public int getHeight()
getHeight
in class FormItem
Appearance overview and related methods
public void setIconVAlign(VerticalAlignment iconVAlign)
setIconVAlign
in class FormItem
iconVAlign
- iconVAlign Default value is Canvas.TOPpublic VerticalAlignment getIconVAlign()
getIconVAlign
in class FormItem
public void setMinHeight(int minHeight)
height
is less than this value, the text area will still
render at this height.
minHeight
- 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
- printFullText Default value is truePrinting overview and related methods
public java.lang.Boolean getPrintFullText()
Printing overview and related methods
public 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 FormItem
selectOnFocus
- selectOnFocus Default value is nullFocus overview and related methods
public 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 FormItem
Focus overview and related methods
public 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
- showHintInField Default value is nullFormItem.setHint(java.lang.String)
,
Appearance overview and related methods
public java.lang.Boolean getShowHintInField()
CSS style for the hint is textBoxStyle
with the suffix "Hint" appended to
it.
FormItem.getHint()
,
Appearance overview and related methods
public void setTextBoxStyle(java.lang.String textBoxStyle)
CompoundFormItem_skinning
discussion for
special skinning considerations.
setTextBoxStyle
in class FormItem
textBoxStyle
- textBoxStyle Default value is "textItem"Appearance overview and related methods
public java.lang.String getTextBoxStyle()
CompoundFormItem_skinning
discussion for
special skinning considerations.
getTextBoxStyle
in class FormItem
Appearance overview and related methods
public void setWidth(int width)
setWidth
in class FormItem
width
- width Default value is 150Appearance overview and related methods
public int getWidth()
getWidth
in class FormItem
Appearance overview and related methods
public void deselectValue()
public void deselectValue(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 void selectValue()
public void setSelectionRange(int start, int end)
start
- selection starting character indexend
- end of selection character indexpublic void setLength(java.lang.Integer length)
length
- the lengthpublic java.lang.Integer getLength()
public void setWrap(TextAreaWrap wrap)
wrap
- wrap Default value is TextAreaWrap.SOFT
public TextAreaWrap getWrap()
public int[] getSelectionRange()
public java.lang.String getValueAsString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |