/** * When generating a print-view of the component containing this TextItem, should the form item expand to accomodate its * value? If set to false the text box will not expand to fit its content in the print view, instead showing exactly as it * does in the live form. * * @param printFullText printFullText Default value is false * @see com.smartgwt.client.docs.Printing Printing overview and related methods */ public void setPrintFullText(Boolean printFullText) { setAttribute("printFullText", printFullText); }
/** * Allows the {@link com.smartgwt.client.widgets.form.DynamicForm#getSelectOnFocus selectOnFocus} behavior to be configured * on a per-FormItem basis. Normally all items in a form default to the value of {@link * com.smartgwt.client.widgets.form.DynamicForm#getSelectOnFocus selectOnFocus}. * * @param selectOnFocus selectOnFocus Default value is null * @see com.smartgwt.client.docs.Focus Focus overview and related methods */ public void setSelectOnFocus(Boolean selectOnFocus) { setAttribute("selectOnFocus", selectOnFocus); }
/** * Default height for text items. * * @param height height Default value is 19 * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setHeight(int height) { setAttribute("height", height); }
/** * If showing hint for this form item, should it be shown within the field? <P>CSS style for the hint is {@link * com.smartgwt.client.widgets.form.fields.TextItem#getTextBoxStyle textBoxStyle} with the suffix "Hint" appended to it. * <p><b>Note : </b> This is an advanced setting</p> * * @param showHintInField showHintInField Default value is null * @see com.smartgwt.client.widgets.form.fields.FormItem#setHint * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setShowHintInField(Boolean showHintInField) { setAttribute("showHintInField", showHintInField); }
/** * Character that is used to fill required empty mask positions to display text while control has focus. * <p><b>Note : </b> This is an advanced setting</p> * * @param maskPromptChar maskPromptChar Default value is "_" */ public void setMaskPromptChar(String maskPromptChar) { setAttribute("maskPromptChar", maskPromptChar); }
/** * Default width for fields. * * @param width width Default value is 150 * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setWidth(int width) { setAttribute("width", width); }
/** * if set, maximum number of characters for this field * * @param length length Default value is null * @see com.smartgwt.client.docs.Validation Validation overview and related methods */ public void setLength(Integer length) { setAttribute("length", length); }
/** * Character that is used to fill required empty mask positions to display text while control has no focus. * <p><b>Note : </b> This is an advanced setting</p> * * @param maskPadChar maskPadChar Default value is " " */ public void setMaskPadChar(String maskPadChar) { setAttribute("maskPadChar", maskPadChar); }
/** * Should entered mask value be saved with embedded literals? * <p><b>Note : </b> This is an advanced setting</p> * * @param maskSaveLiterals maskSaveLiterals Default value is null */ public void setMaskSaveLiterals(Boolean maskSaveLiterals) { setAttribute("maskSaveLiterals", maskSaveLiterals); }
/** * Base CSS class name for this item's input element. NOTE: See the {@link CompoundFormItem_skinning} discussion for * special skinning considerations. * * @param textBoxStyle textBoxStyle Default value is "textItem" * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setTextBoxStyle(String textBoxStyle) { setAttribute("textBoxStyle", textBoxStyle); }
/** * Should this form item fire its {@link com.smartgwt.client.widgets.form.fields.FormItem#addChangeHandler change} handler * (and store its value in the form) on every keypress? Set to <code>false</code> to suppress the 'change' handler firing * (and the value stored) on every keypress. <p> Note: If <code>false</code>, the value returned by {@link * com.smartgwt.client.widgets.form.fields.FormItem#getValue getValue} will not reflect the value displayed in the form * item element as long as focus is in the form item element. * * @param changeOnKeypress changeOnKeypress Default value is true */ public void setChangeOnKeypress(Boolean changeOnKeypress) { setAttribute("changeOnKeypress", changeOnKeypress); }
/** * During entry into masked field, should keystrokes overwrite current position value? By default new keystrokes are * inserted into the field. * <p><b>Note : </b> This is an advanced setting</p> * * @param maskOverwriteMode maskOverwriteMode Default value is null */ public void setMaskOverwriteMode(Boolean maskOverwriteMode) { setAttribute("maskOverwriteMode", maskOverwriteMode); }
public TextItem(){ setAttribute("editorType", "TextItem"); }
/** * 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. <P> Note: keypress filtering cannot be used at the same time as a {@link * com.smartgwt.client.widgets.form.fields.TextItem#getMask mask}. * Set the keyPressFilter for this item * <p><b>Note : </b> This is an advanced setting</p> * * @param keyPressFilter new keyPress filter for the item. Default value is null * @see com.smartgwt.client.widgets.form.fields.TextItem#setCharacterCasing * @see <a href="http://www.smartclient.com/smartgwt/showcase/#form_keypress_filter" target="examples">KeyPress Filters Example</a> */ public void setKeyPressFilter(String keyPressFilter) { setAttribute("keyPressFilter", keyPressFilter); }
/** * Input mask used to filter text entry. <P> Sample masks: <UL> <LI>Phone number: (###) ###-####</LI> <LI>Social Security * number: ###-##-#### <LI>First name: >?<??????????</LI> <LI>Date: ##/##/####</LI> <LI>State: >LL</LI> </UL> * Overview of available mask characters <P> <table class="normal"> <tr><th>Character</th><th>Description</th></tr> * <tr><td>0</td><td>Digit (0 through 9) or plus [+] or minus [-] signs</td></tr> <tr><td>9</td><td>Digit or * space</td></tr> <tr><td>#</td><td>Digit</td></tr> <tr><td>L</td><td>Letter (A through Z)</td></tr> * <tr><td>?</td><td>Letter (A through Z) or space</td></tr> <tr><td>A</td><td>Letter or digit</td></tr> * <tr><td>a</td><td>Letter or digit</td></tr> <tr><td>C</td><td>Any character or space</td></tr> <tr><td> </td></tr> * <tr><td><</td><td>Causes all characters that follow to be converted to lowercase</td></tr> * <tr><td>></td><td>Causes all characters that follow to be converted to uppercase</td></tr> </table> <P> Any character * not matching one of the above mask characters or that is escaped with a backslash (\) is considered to be a literal. <P> * Custom mask characters can be defined by standard regular expression character set or range. For example, a hexadecimal * color code mask could be: <UL> <LI>Color: \#>[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]</LI> </UL> <P> Note: input * mask cannot be used at the same time as a {@link com.smartgwt.client.widgets.form.fields.TextItem#getKeyPressFilter * keyPressFilter}. * Set the mask for this item. <P> Note that the current value of the field is cleared when changing the mask. * <p><b>Note : </b> This is an advanced setting</p> * * @param mask mask to apply to text item. Default value is null * @see com.smartgwt.client.widgets.form.fields.TextItem#setKeyPressFilter * @see <a href="http://www.smartclient.com/smartgwt/showcase/#form_masking" target="examples">Text - Masked Example</a> */ public void setMask(String mask) { setAttribute("mask", mask); }
/** * Should entered characters be converted to upper or lowercase? Also applies to values applied with {@link * com.smartgwt.client.widgets.form.fields.FormItem#setValue FormItem.setValue}. <P> Note: character casing cannot be used * at the same time as a {@link com.smartgwt.client.widgets.form.fields.TextItem#getMask mask}. * <p><b>Note : </b> This is an advanced setting</p> * * @param characterCasing characterCasing Default value is TextItem.DEFAULT * @see <a href="http://www.smartclient.com/smartgwt/showcase/#form_keypress_filter" target="examples">KeyPress Filters Example</a> */ public void setCharacterCasing(CharacterCasing characterCasing) { setAttribute("characterCasing", characterCasing.getValue()); }
public TextItem(String name) { setName(name); setAttribute("editorType", "TextItem"); }
public TextItem(String name, String title) { setName(name); setTitle(title); setAttribute("editorType", "TextItem"); }