|
|||||||||
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(String name)
|
|
TimeItem(String name,
String title)
|
Method Summary | |
---|---|
TimeDisplayFormat |
getDisplayFormat()
What format should this item's time string be presented in? |
String |
getMask()
Internal-use only for a TimeItem. |
Boolean |
getMaskOverwriteMode()
Internal-use only for a TimeItem. |
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 |
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(String mask)
Internal-use only for a TimeItem. |
void |
setMaskOverwriteMode(Boolean maskOverwriteMode)
Internal-use only for a TimeItem. |
void |
setMaskSaveLiterals(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(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(String name)
public TimeItem(String name, String title)
Method Detail |
---|
public static TimeItem getOrCreateRef(JavaScriptObject jsObj)
public void setMask(String mask)
Note : This is an advanced setting
setMask
in class TextItem
mask
- mask Default value is nullsetUseMask(java.lang.Boolean)
public String getMask()
getMask
in class TextItem
getUseMask()
public void setMaskOverwriteMode(Boolean maskOverwriteMode)
Note : This is an advanced setting
setMaskOverwriteMode
in class TextItem
maskOverwriteMode
- maskOverwriteMode Default value is nullsetUseMask(java.lang.Boolean)
public Boolean getMaskOverwriteMode()
getMaskOverwriteMode
in class TextItem
getUseMask()
public void setMaskSaveLiterals(Boolean maskSaveLiterals)
Note : This is an advanced setting
setMaskSaveLiterals
in class TextItem
maskSaveLiterals
- maskSaveLiterals Default value is nullsetUseMask(java.lang.Boolean)
public Boolean getMaskSaveLiterals()
getMaskSaveLiterals
in class TextItem
getUseMask()
public void setTimeFormatter(TimeDisplayFormat timeFormatter)
timeFormatter
or the system-side
setTimeFormatter
in class FormItem
timeFormatter
- timeFormatter Default value is "toShort24HourTime"Appearance overview and related methods
public TimeDisplayFormat getTimeFormatter()
timeFormatter
or the system-side
getTimeFormatter
in class FormItem
Appearance overview and related methods
public void setUseMask(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 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 FormItem
timeFormatter
- 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 |