|
|||||||||
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.
displayFormat
allows you to set the display format
for this field. See also
com.smartgwt.client..Time#setNormalDisplayFormat
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
com.smartgwt.client..Time#toShortTime
.
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 | |
---|---|
TimeFormatter |
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)
|
Boolean |
getUseMask()
If true, a data entry mask will be enabled in the field based on the displayFormat . |
void |
setDisplayFormat(TimeFormatter timeFormatter)
What format should this item's time string be presented in? |
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 |
setUseMask(Boolean useMask)
If true, a data entry mask will be enabled in the field based on the displayFormat . |
Methods inherited from class com.smartgwt.client.widgets.form.fields.TextItem |
---|
deselectValue, deselectValue, getCharacterCasing, getHeight, getHint, getKeyPressFilter, getLength, getMaskPadChar, getMaskPromptChar, getSelectionRange, getSelectOnFocus, getShowHintInField, getTextBoxStyle, getWidth, selectValue, setCharacterCasing, setHeight, setKeyPressFilter, setLength, setMaskPadChar, setMaskPromptChar, 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, getAttributeAsIntArray, getAttributeAsMap, getAttributeAsObject, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, 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 setUseMask(Boolean useMask)
displayFormat
. Note that if a non-padded displayFormat
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()
displayFormat
. Note that if a non-padded displayFormat
is specified, it will be changed to the
corresponding padded version (ex. "toShort24HourTime" will be changed to "toShortPadded24HourTime").
public void setMask(String mask)
Note : This is an advanced setting
setMask
in class TextItem
mask
- mask Default value is nullpublic String getMask()
getMask
in class TextItem
public void setMaskSaveLiterals(Boolean maskSaveLiterals)
Note : This is an advanced setting
setMaskSaveLiterals
in class TextItem
maskSaveLiterals
- maskSaveLiterals Default value is nullpublic Boolean getMaskSaveLiterals()
getMaskSaveLiterals
in class TextItem
public void setMaskOverwriteMode(Boolean maskOverwriteMode)
Note : This is an advanced setting
setMaskOverwriteMode
in class TextItem
maskOverwriteMode
- maskOverwriteMode Default value is nullpublic Boolean getMaskOverwriteMode()
getMaskOverwriteMode
in class TextItem
public void setDisplayFormat(TimeFormatter timeFormatter)
timeFormatter
- displayFormat Default value is "toShort24HourTime"public TimeFormatter getDisplayFormat()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |