|
|||||||||
| 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.TextItem
com.smartgwt.client.widgets.form.fields.TimeItem
public class TimeItem
FormItem for editing times in a text field.
timeFormatter allows you to set the display
format for this field. See also
String for system-wide settings.
TimeItem automatically accepts both 12 and 24 hour time as well as partial times and a variety of possible time value separators. Examples:
11:34:45 AM => 11:34:45 1:3:5 AM => 01:30:50 1:3p => 13:30:00 11 34 am => 11:34:00 11-34 => 11:34:00 113445 => 11:34:45 13445 => 01:34:45 1134 => 11:34:00 134 => 01:34:00
Values entered by the user are stored as JavaScript Date objects in GMT/UTC
time regardless of the local time zone. Note if you log, alert() or otherwise convert a
Date into a String, the default behavior is to show it in local time. To see the correct
time value, use the JavaScript built-in APIs dateValue.getUTCHours/Minutes/Seconds() or the
String.
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.core.JsObject |
|---|
jsObj |
| Constructor Summary | |
|---|---|
TimeItem()
|
|
TimeItem(JavaScriptObject jsObj)
|
|
TimeItem(java.lang.String name)
|
|
TimeItem(java.lang.String name,
java.lang.String title)
|
|
| Method Summary | |
|---|---|
TimeDisplayFormat |
getDisplayFormat()
What format should this item's time string be presented in? |
java.lang.String |
getMask()
Internal-use only for a TimeItem. |
java.lang.Boolean |
getMaskOverwriteMode()
Internal-use only for a TimeItem. |
java.lang.Boolean |
getMaskSaveLiterals()
Internal-use only for a TimeItem. |
static TimeItem |
getOrCreateRef(JavaScriptObject jsObj)
|
TimeDisplayFormat |
getTimeFormatter()
What format should this item's time string be presented in? If unset the format will be derived from timeFormatter or the system-side |
java.lang.Boolean |
getUseMask()
If true, a data entry mask will be enabled in the field based on the timeFormatter. |
void |
setDisplayFormat(TimeDisplayFormat timeFormatter)
What format should this item's time string be presented in? |
void |
setDisplayFormat(TimeFormatter timeFormatter)
Deprecated. Use setDisplayFormat(TimeDisplayFormat) instead. |
void |
setMask(java.lang.String mask)
Internal-use only for a TimeItem. |
void |
setMaskOverwriteMode(java.lang.Boolean maskOverwriteMode)
Internal-use only for a TimeItem. |
void |
setMaskSaveLiterals(java.lang.Boolean maskSaveLiterals)
Internal-use only for a TimeItem. |
void |
setTimeFormatter(TimeDisplayFormat timeFormatter)
What format should this item's time string be presented in? If unset the format will be derived from timeFormatter or the system-side |
void |
setUseMask(java.lang.Boolean useMask)
If true, a data entry mask will be enabled in the field based on the timeFormatter. |
| Methods inherited from class com.smartgwt.client.widgets.form.fields.TextItem |
|---|
deselectValue, deselectValue, getChangeOnKeypress, getCharacterCasing, getEnteredValue, getFormatOnFocusChange, getHeight, getHint, getKeyPressFilter, getLength, getMaskPadChar, getMaskPromptChar, getPrintFullText, getSelectionRange, getSelectOnFocus, getShowHintInField, getTextBoxStyle, getValueAsString, getWidth, selectValue, setChangeOnKeypress, setCharacterCasing, setFormatOnFocusChange, setHeight, setKeyPressFilter, setLength, setMaskPadChar, setMaskPromptChar, setPrintFullText, setSelectionRange, setSelectOnFocus, setShowHintInField, setTextBoxStyle, setWidth |
| 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 TimeItem()
public TimeItem(JavaScriptObject jsObj)
public TimeItem(java.lang.String name)
public TimeItem(java.lang.String name,
java.lang.String title)
| Method Detail |
|---|
public static TimeItem getOrCreateRef(JavaScriptObject jsObj)
public void setMask(java.lang.String mask)
Note : This is an advanced setting
setMask in class TextItemmask - mask Default value is nullsetUseMask(java.lang.Boolean)public java.lang.String getMask()
getMask in class TextItemgetUseMask()public void setMaskOverwriteMode(java.lang.Boolean maskOverwriteMode)
Note : This is an advanced setting
setMaskOverwriteMode in class TextItemmaskOverwriteMode - maskOverwriteMode Default value is nullsetUseMask(java.lang.Boolean)public java.lang.Boolean getMaskOverwriteMode()
getMaskOverwriteMode in class TextItemgetUseMask()public void setMaskSaveLiterals(java.lang.Boolean maskSaveLiterals)
Note : This is an advanced setting
setMaskSaveLiterals in class TextItemmaskSaveLiterals - maskSaveLiterals Default value is nullsetUseMask(java.lang.Boolean)public java.lang.Boolean getMaskSaveLiterals()
getMaskSaveLiterals in class TextItemgetUseMask()public void setTimeFormatter(TimeDisplayFormat timeFormatter)
timeFormatter or the system-side
setTimeFormatter in class FormItemtimeFormatter - timeFormatter Default value is "toShort24HourTime"Appearance overview and related methodspublic TimeDisplayFormat getTimeFormatter()
timeFormatter or the system-side
getTimeFormatter in class FormItemAppearance overview and related methodspublic void setUseMask(java.lang.Boolean useMask)
timeFormatter. Note that if a non-padded timeFormatter is specified, it will be changed to the
corresponding padded version (ex. "toShort24HourTime" will be changed to "toShortPadded24HourTime").
Note : This is an advanced setting
useMask - useMask Default value is nullpublic java.lang.Boolean getUseMask()
timeFormatter. Note that if a non-padded timeFormatter is specified, it will be changed to the
corresponding padded version (ex. "toShort24HourTime" will be changed to "toShortPadded24HourTime").
public void setDisplayFormat(TimeFormatter timeFormatter)
setDisplayFormat(TimeDisplayFormat) instead.
setDisplayFormat in class FormItemtimeFormatter - displayFormat Default value is "toShort24HourTime"FormItem.setInputFormat(java.lang.String),
FormItem.setDateFormatter(com.smartgwt.client.types.DateDisplayFormat),
FormItem.setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat)public void setDisplayFormat(TimeDisplayFormat timeFormatter)
TimeDisplayFormat - displayFormat Default value is "toShort24HourTime"public TimeDisplayFormat getDisplayFormat()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||