public class TimeItem extends FormItem
The display format for this field may be set by timeFormatter
. Defaults
are picked up from timeFormatter24Hour
and timeFormatter12Hour
.
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 local time.
The day, month and year values of this Date
object are not relevant and should
be ignored.
By default, when used in a SearchForm
or as a field in a ListGrid
's
filter editor
, TimeItems will automatically
generate
AdvancedCriteria - for example, entering "11:00" into the item will generate a
betweenInclusive
Criterion that selects all times between
11:00:00 and 11:59:59. If the form is databound and the DataSource is marked as being
allowAdvancedCriteria
:false, the criteria generated
will be simple, checking for data with logical time values equal to the displayed value.
FormItem.CustomStateGetter, FormItem.StateCustomizer
configOnly, scClassName, warnOnEditorTypeConversion, warnOnEditorTypeConversionDefault
id
factoryCreated, factoryProperties
Constructor and Description |
---|
TimeItem() |
TimeItem(com.google.gwt.core.client.JavaScriptObject jsObj) |
TimeItem(java.lang.String name) |
TimeItem(java.lang.String name,
java.lang.String title) |
Modifier and Type | Method and Description |
---|---|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
static void |
changePickerIconDefaults(FormItemIcon defaults) |
void |
deselectValue()
If
useTextField is true, falls through to
standard deselectValue() implementation on this
items freeform text entry field. |
void |
deselectValue(java.lang.Boolean start)
If
useTextField is true, falls through to
standard deselectValue() implementation on this
items freeform text entry field. |
SelectItem |
getAmpmItem()
Select item to hold the AM/PM value for the timeItem when
useTextField is false. |
SelectItem |
getAmpmItemProperties()
Custom properties to apply to this timeItem's generated
AM/PM picker . |
java.lang.String |
getAmpmItemTitle()
Title to show for the
AM/PM picker . |
java.lang.String |
getBrowserInputType()
If
useTextField is true and browserInputType is
set to "time", then a native HTML5 time input is used in place of a text input. |
TimeDisplayFormat |
getDisplayFormat()
Deprecated.
|
int |
getDuration()
When
useTextField is set to false, this method
returns the value of the time expressed as a duration in the timeUnit
provided. |
int |
getDuration(TimeUnit timeUnit)
When
useTextField is set to false, this method
returns the value of the time expressed as a duration in the timeUnit
provided. |
java.lang.String |
getEnteredValue()
Returns the raw text value typed into this items text field if
useTextField is true (otherwise returns the result of
this.getValue()). |
java.lang.Integer |
getHourIncrement()
When
useTextField is false and hourValues is unset, this attribute specifies the
increment to use when generating entries for the hour picker. |
SelectItem |
getHourItem()
Select item to hold the hours portion of the time or
duration when useTextField is false. |
java.lang.String |
getHourItemPrompt()
The hover prompt to show for the
hour picker . |
SelectItem |
getHourItemProperties()
Custom properties to apply to this timeItem's generated
hour picker . |
java.lang.String |
getHourItemTitle()
Title to show for the
hour picker . |
java.lang.Integer |
getHourMaxValue()
When
useTextField is false and hourValues is unset, this attribute specifies the
maximum value present in the hour picker. |
java.lang.Integer |
getHourMinValue()
When
useTextField is false and hourValues is unset, this attribute specifies the
minimum value present in the hour picker. |
int[] |
getHourValues()
An array of values to make available in the
hour
picker when useTextField is false. |
java.lang.String |
getInvalidTimeStringMessage()
Validation error message to display if the user enters an invalid time string.
|
java.lang.Integer |
getMillisecondIncrement()
When
useTextField is false and millisecondValues is unset, this attribute
specifies the increment to use when generating entries for the millisecond picker. |
SelectItem |
getMillisecondItem()
Select item to hold the milliseconds portion of the time or
duration when useTextField is false. |
java.lang.String |
getMillisecondItemPrompt()
The hover prompt to show for the
millisecond
picker . |
SelectItem |
getMillisecondItemProperties()
Custom properties to apply to this timeItem's generated
millisecond picker . |
java.lang.String |
getMillisecondItemTitle()
Title to show for the
millisecond picker . |
java.lang.Integer |
getMillisecondMaxValue()
When
useTextField is false and millisecondValues is unset, this attribute
specifies the maximum value present in the millisecond picker. |
java.lang.Integer |
getMillisecondMinValue()
When
useTextField is false and millisecondValues is unset, this attribute
specifies the minimum value present in the millisecond picker. |
int[] |
getMillisecondValues()
An array of values to make available in the
millisecond picker when useTextField is false. |
java.lang.Integer |
getMinuteIncrement()
When
useTextField is false and minuteValues is unset, this attribute specifies the
increment to use when generating entries for the minute picker. |
SelectItem |
getMinuteItem()
Select item to hold the minutes portion of the time or
duration when useTextField is false. |
java.lang.String |
getMinuteItemPrompt()
The hover prompt to show for the
minute picker . |
SelectItem |
getMinuteItemProperties()
Custom properties to apply to this timeItem's generated
minute picker . |
java.lang.String |
getMinuteItemTitle()
Title to show for the
minute picker . |
java.lang.Integer |
getMinuteMaxValue()
When
useTextField is false and minuteValues is unset, this attribute specifies the
maximum value present in the minute picker. |
java.lang.Integer |
getMinuteMinValue()
When
useTextField is false and minuteValues is unset, this attribute specifies the
minimum value present in the minute picker. |
int[] |
getMinuteValues()
An array of values to make available in the
minute
picker when useTextField is false. |
static TimeItem |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.Integer |
getSecondIncrement()
When
useTextField is false and secondValues is unset, this attribute specifies the
increment to use when generating entries for the second picker. |
SelectItem |
getSecondItem()
Select item to hold the seconds portion of the time or
duration when useTextField is false. |
java.lang.String |
getSecondItemPrompt()
The hover prompt to show for the
second picker . |
SelectItem |
getSecondItemProperties()
Custom properties to apply to this timeItem's generated
seconds picker . |
java.lang.String |
getSecondItemTitle()
Title to show for the
second picker . |
java.lang.Integer |
getSecondMaxValue()
When
useTextField is false and secondValues is unset, this attribute specifies the
maximum value present in the second picker. |
java.lang.Integer |
getSecondMinValue()
When
useTextField is false and secondValues is unset, this attribute specifies the
minimum value present in the second picker. |
int[] |
getSecondValues()
An array of values to make available in the
second
picker when useTextField is false. |
int[] |
getSelectionRange()
If
useTextField is true, falls through to
standard com.smartgwt.client.widgets.form.fields.FormItem#getSelectionRange implementation on this item's
freeform text entry field. |
java.lang.Boolean |
getShowHintInField()
If
useTextField is true and a hint is set, should the hint be shown within the field? |
java.lang.Boolean |
getShowHourItem()
Controls whether to display the
hourItem when
useTextField is false. |
java.lang.Boolean |
getShowMillisecondItem()
Controls whether to display the
millisecondItem when useTextField is false. |
java.lang.Boolean |
getShowMinuteItem()
Controls whether to display the
minuteItem when
useTextField is false. |
java.lang.Boolean |
getShowSecondItem()
Controls whether to display the
secondItem when
useTextField is false. |
Alignment |
getTextAlign()
If
useTextField is true , this
property governs the alignment of text within the text field. |
java.lang.String |
getTextBoxStyle()
Base CSS class for this item's text box.
|
TextItem |
getTextField()
Text field to hold the entire time in "type in" format, if
useTextField is true. |
TextItem |
getTextFieldProperties()
Custom properties to apply to the
text field
generated for this timeItem when useTextField
is true. |
TimeDisplayFormat |
getTimeFormatter()
If
useTextField is true, what format should
this item's time string be presented in? |
TimeDisplayFormat |
getTimeFormatter12Hour()
If
useTextField is true, and use24HourTime is false, what format should this
item's time string be presented in? |
TimeDisplayFormat |
getTimeFormatter24Hour()
If
useTextField is true, and use24HourTime is true, what format should this item's
time string be presented in? |
java.lang.Boolean |
getUse24HourTime()
Whether to enforce 24-hour time in the UI.
|
java.lang.Boolean |
getUseMask()
If true, a data entry mask will be enabled in the field based on the
timeFormatter . |
boolean |
getUsePlaceholderForHint()
If
showing the hint in field and if
supported by the browser, should the HTML5
placeholder attribute
be used to display the hint within the field? If set to false , then use of
the placeholder attribute is disabled and an alternative technique to display
the hint in-field is used instead. |
java.lang.Boolean |
getUseTextField()
Should we show the time in a text field, or as a number of SelectItems?
|
java.util.Date |
getValueAsDate()
Return the value tracked by this form item.
|
java.lang.Boolean |
getWrapHintText()
If this item is showing a
FormItem.hint , should the
hint text be allowed to wrap? Setting this property to false will render the hint on a single line without
wrapping, expanding the width required to render the item if necessary. |
boolean |
pendingStatusChanged(DynamicForm form,
FormItem item,
boolean pendingStatus,
java.lang.Object newValue,
java.lang.Object value)
Notification method called when
showPending is
enabled and this time item should either clear or show its pending visual state. |
void |
selectValue()
If
useTextField is true, falls through to
standard selectValue() implementation on this items
freeform text entry field. |
void |
setAmpmItemProperties(SelectItem ampmItemProperties)
Custom properties to apply to this timeItem's generated
AM/PM picker . |
void |
setAmpmItemTitle(java.lang.String ampmItemTitle)
Title to show for the
AM/PM picker . |
void |
setBrowserInputType(java.lang.String browserInputType)
If
useTextField is true and browserInputType is
set to "time", then a native HTML5 time input is used in place of a text input. |
static void |
setDefaultProperties(TimeItem timeItemProperties)
Class level method to set the default properties of this class.
|
void |
setDisplayFormat(TimeDisplayFormat timeFormatter)
Deprecated.
Use
getTimeFormatter() instead. |
void |
setDisplayFormat(TimeFormatter timeFormatter)
Deprecated.
Use
setDisplayFormat(TimeDisplayFormat) instead. |
void |
setHourIncrement(java.lang.Integer hourIncrement)
When
useTextField is false and hourValues is unset, this attribute specifies the
increment to use when generating entries for the hour picker. |
void |
setHourItemPrompt(java.lang.String hourItemPrompt)
The hover prompt to show for the
hour picker . |
void |
setHourItemProperties(SelectItem hourItemProperties)
Custom properties to apply to this timeItem's generated
hour picker . |
void |
setHourItemTitle(java.lang.String hourItemTitle)
Title to show for the
hour picker . |
void |
setHourMaxValue(java.lang.Integer hourMaxValue)
When
useTextField is false and hourValues is unset, this attribute specifies the
maximum value present in the hour picker. |
void |
setHourMinValue(java.lang.Integer hourMinValue)
When
useTextField is false and hourValues is unset, this attribute specifies the
minimum value present in the hour picker. |
void |
setHours(int hours)
Set the hour value of this TimeItem.
|
void |
setHourValues(int... hourValues)
An array of values to make available in the
hour
picker when useTextField is false. |
void |
setInvalidTimeStringMessage(java.lang.String invalidTimeStringMessage)
Validation error message to display if the user enters an invalid time string.
|
void |
setMillisecondIncrement(java.lang.Integer millisecondIncrement)
When
useTextField is false and millisecondValues is unset, this attribute
specifies the increment to use when generating entries for the millisecond picker. |
void |
setMillisecondItemPrompt(java.lang.String millisecondItemPrompt)
The hover prompt to show for the
millisecond
picker . |
void |
setMillisecondItemProperties(SelectItem millisecondItemProperties)
Custom properties to apply to this timeItem's generated
millisecond picker . |
void |
setMillisecondItemTitle(java.lang.String millisecondItemTitle)
Title to show for the
millisecond picker . |
void |
setMillisecondMaxValue(java.lang.Integer millisecondMaxValue)
When
useTextField is false and millisecondValues is unset, this attribute
specifies the maximum value present in the millisecond picker. |
void |
setMillisecondMinValue(java.lang.Integer millisecondMinValue)
When
useTextField is false and millisecondValues is unset, this attribute
specifies the minimum value present in the millisecond picker. |
void |
setMilliseconds(int milliseconds)
Set the milliseconds value of this TimeItem.
|
void |
setMillisecondValues(int... millisecondValues)
An array of values to make available in the
millisecond picker when useTextField is false. |
void |
setMinuteIncrement(java.lang.Integer minuteIncrement)
When
useTextField is false and minuteValues is unset, this attribute specifies the
increment to use when generating entries for the minute picker. |
void |
setMinuteItemPrompt(java.lang.String minuteItemPrompt)
The hover prompt to show for the
minute picker . |
void |
setMinuteItemProperties(SelectItem minuteItemProperties)
Custom properties to apply to this timeItem's generated
minute picker . |
void |
setMinuteItemTitle(java.lang.String minuteItemTitle)
Title to show for the
minute picker . |
void |
setMinuteMaxValue(java.lang.Integer minuteMaxValue)
When
useTextField is false and minuteValues is unset, this attribute specifies the
maximum value present in the minute picker. |
void |
setMinuteMinValue(java.lang.Integer minuteMinValue)
When
useTextField is false and minuteValues is unset, this attribute specifies the
minimum value present in the minute picker. |
void |
setMinutes(int minutes)
Set the minute value of this TimeItem.
|
void |
setMinuteValues(int... minuteValues)
An array of values to make available in the
minute
picker when useTextField is false. |
void |
setSecondIncrement(java.lang.Integer secondIncrement)
When
useTextField is false and secondValues is unset, this attribute specifies the
increment to use when generating entries for the second picker. |
void |
setSecondItemPrompt(java.lang.String secondItemPrompt)
The hover prompt to show for the
second picker . |
void |
setSecondItemProperties(SelectItem secondItemProperties)
Custom properties to apply to this timeItem's generated
seconds picker . |
void |
setSecondItemTitle(java.lang.String secondItemTitle)
Title to show for the
second picker . |
void |
setSecondMaxValue(java.lang.Integer secondMaxValue)
When
useTextField is false and secondValues is unset, this attribute specifies the
maximum value present in the second picker. |
void |
setSecondMinValue(java.lang.Integer secondMinValue)
When
useTextField is false and secondValues is unset, this attribute specifies the
minimum value present in the second picker. |
void |
setSeconds(int seconds)
Set the seconds value of this TimeItem.
|
void |
setSecondValues(int... secondValues)
An array of values to make available in the
second
picker when useTextField is false. |
void |
setSelectionRange(int start,
int end)
If
useTextField is true, falls through to
standard setSelectionRange implementation on
this items freeform text entry field. |
void |
setShowHintInField(java.lang.Boolean showHintInField)
If
useTextField is true and a hint is set, should the hint be shown within the field? |
void |
setShowHourItem(java.lang.Boolean showHourItem)
Controls whether to display the
hourItem when
useTextField is false. |
void |
setShowMillisecondItem(java.lang.Boolean showMillisecondItem)
Controls whether to display the
millisecondItem when useTextField is false. |
void |
setShowMinuteItem(java.lang.Boolean showMinuteItem)
Controls whether to display the
minuteItem when
useTextField is false. |
void |
setShowSecondItem(java.lang.Boolean showSecondItem)
Controls whether to display the
secondItem when
useTextField is false. |
void |
setTextAlign(Alignment textAlign)
If
useTextField is true , this
property governs the alignment of text within the text field. |
void |
setTextBoxStyle(java.lang.String textBoxStyle)
Base CSS class for this item's text box.
|
void |
setTextFieldProperties(TextItem textFieldProperties)
Custom properties to apply to the
text field
generated for this timeItem when useTextField
is true. |
void |
setTimeFormatter(TimeDisplayFormat timeFormatter)
If
useTextField is true, what format should
this item's time string be presented in? |
void |
setTimeFormatter12Hour(TimeDisplayFormat timeFormatter12Hour)
If
useTextField is true, and use24HourTime is false, what format should this
item's time string be presented in? |
void |
setTimeFormatter24Hour(TimeDisplayFormat timeFormatter24Hour)
If
useTextField is true, and use24HourTime is true, what format should this item's
time string be presented in? |
void |
setUse24HourTime(java.lang.Boolean use24HourTime)
Whether to enforce 24-hour time in the UI.
|
void |
setUseMask(java.lang.Boolean useMask)
If true, a data entry mask will be enabled in the field based on the
timeFormatter . |
void |
setUsePlaceholderForHint(boolean usePlaceholderForHint)
If
showing the hint in field and if
supported by the browser, should the HTML5
placeholder attribute
be used to display the hint within the field? If set to false , then use of
the placeholder attribute is disabled and an alternative technique to display
the hint in-field is used instead. |
void |
setUseTextField(java.lang.Boolean useTextField)
Should we show the time in a text field, or as a number of SelectItems?
|
void |
setWrapHintText(java.lang.Boolean wrapHintText)
If this item is showing a
FormItem.hint , should the
hint text be allowed to wrap? Setting this property to false will render the hint on a single line without
wrapping, expanding the width required to render the item if necessary. |
_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIcon, addIcon, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPendingStatusChangedHandler, addPickerIconClickHandler, addShowContextMenuHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, addValueHoverHandler, addValueIconClickHandler, applyFormula, asSGWTComponent, blurItem, canEditCriterion, clearErrors, clearValue, disable, disableIcon, enable, enableIcon, error, error, errorIfNotCreated, focusAfterItem, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getAlwaysShowControlBox, getApplyAlignToText, getApplyHeightToTextBox, getAriaRole, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsObject, getAttributeAsString, getAutoComplete, getAutoCompleteKeywords, getBrowserSpellCheck, getCanEdit, getCanEditOpaqueValues, getCanFocus, getCanSelectText, getCanTabToIcons, getCanvasAutoChild, getCellHeight, getCellStyle, getChangeOnKeypress, getClassName, getClipStaticValue, getClipTitle, getConfig, getContainerWidget, getControlStyle, getCriteriaField, getCriterion, getCriterion, getCursorPosition, getCustomState, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDisabled, getDisableIconsOnReadOnly, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEditProxyConstructor, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getErrors, getExportFormat, getFetchMissingValues, getFieldName, getFilterLocally, getForeignDisplayField, getForm, getFormat, getFormItemAutoChild, getFormula, getFullDataPath, getGlobalTabIndex, getGridColNum, getGridRowNum, getHeight, getHeightAsString, getHidden, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconHSpace, getIconPageRect, getIconPrompt, getIconRect, getIcons, getIconTabPosition, getIconVAlign, getIconWidth, getID, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getListGrid, getLoadingDisplayValue, getLocateItemBy, getMinHintWidth, getMultiple, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionDataSource, getOptionDataSourceAsString, getOptionFilterContext, getOptionOperationId, getOriginalValueMessage, getPageLeft, getPageRect, getPageTop, getPaletteDefaults, getPicker, getPickerIcon, getPickerIcon, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconProperties, getPickerIconSrc, getPickerIconStyle, getPickerIconTabPosition, getPickerIconWidth, getPixelHeight, getPixelWidth, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getReadOnlyDisplay, getReadOnlyHover, getReadOnlyTextBoxStyle, getReadOnlyWhen, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRequiredWhen, getRowSpan, getSaveOnEnter, getScClassName, getSelectedRecord, getSelectOnClick, getSelectOnFocus, getShouldSaveValue, getShowClippedTitleOnHover, getShowClippedValueOnHover, getShowDeletions, getShowDisabled, getShowDisabledIconsOnFocus, getShowDisabledPickerIconOnFocus, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedErrorState, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowIconsOnFocus, getShowOldValueInHover, getShowOver, getShowOverIcons, getShowPending, getShowPickerIcon, getShowPickerIconOnFocus, getShowRTL, getShowTitle, getShowValueIconOnly, getStartRow, getStaticHeight, getStopOnError, getSupportsCutPasteEvents, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextFormula, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getUpdateControlOnOver, getUpdatePickerIconOnOver, getUpdateTextBoxOnOver, getUseAdvancedCriteria, getUseDisabledHintStyleForReadOnly, getUseLocalDisplayFieldValue, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueAsRecordList, getValueDeselectedCSSText, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getValueMap, getValueMapAsArray, getVisible, getVisibleHeight, getVisibleTitleWidth, getVisibleWhen, getVisibleWidth, getWarnOnEditorTypeConversion, getWarnOnEditorTypeConversionDefault, getWidth, getWidthAsString, getWrapTitle, handleWarnOnEditorTypeConversion, hasAdvancedCriteria, hasErrors, hide, hideIcon, invalidateDisplayValueCache, isConfigOnly, isCreated, isCutEvent, isDisabled, isDrawn, isFocused, isInGrid, isPasteEvent, isVisible, linkToInstanceUponCreate, mapDisplayToValue, mapValueToDisplay, mapValueToDisplay, mapValueToDisplay, redraw, redraw, removeIcon, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAlwaysShowControlBox, setApplyAlignToText, setApplyHeightToTextBox, setAriaRole, setAriaState, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoComplete, setAutoCompleteKeywords, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanEditOpaqueValues, setCanFocus, setCanSelectText, setCanTabToIcons, setCellHeight, setCellStyle, setChangeOnKeypress, setClipStaticValue, setClipTitle, setColSpan, setColSpan, setConfigOnly, setControlStyle, setCriteriaField, setCriterion, setCriterionGetter, setCriterionSetter, setCustomStateGetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultProperties, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisableIconsOnReadOnly, setDisplayField, setDisplayFormat, setEditorProperties, setEditorType, setEditorType, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEditProxyConstructor, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setErrors, setErrors, setExportFormat, setFetchMissingValues, setFilterLocally, setForeignDisplayField, setFormat, setFormula, setGlobalTabIndex, setHeight, setHeight, setHidden, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconDisabled, setIconHeight, setIconHSpace, setIconPrompt, setIcons, setIconShowOnFocus, setIconVAlign, setIconWidth, setID, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setItemValueHoverFormatter, setJavaScriptObject, setLeft, setLoadingDisplayValue, setLocateItemBy, setMinHintWidth, setMultiple, setMultipleValueSeparator, setName, setNullProperty, setOperator, setOptionCriteria, setOptionDataSource, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setOriginalValueMessage, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconProperties, setPickerIconSrc, setPickerIconStyle, setPickerIconWidth, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setReadOnlyDisplay, setReadOnlyHover, setReadOnlyTextBoxStyle, setReadOnlyWhen, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRequiredWhen, setRowSpan, setSaveOnEnter, setScClassName, setSelectOnClick, setSelectOnFocus, setShouldSaveValue, setShowClippedTitleOnHover, setShowClippedValueOnHover, setShowDeletions, setShowDisabled, setShowDisabledIconsOnFocus, setShowDisabledPickerIconOnFocus, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedErrorState, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIconsOnFocus, setShowIfCondition, setShowOldValueInHover, setShowOver, setShowOverIcons, setShowPending, setShowPickerIcon, setShowPickerIconOnFocus, setShowRTL, setShowTitle, setShowValueIconOnly, setStartRow, setStateCustomizer, setStaticHeight, setStopOnError, setSupportsCutPasteEvents, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextFormula, setTitle, setTitleAlign, setTitleColSpan, setTitleHoverFormatter, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setUpdateControlOnOver, setUpdatePickerIconOnOver, setUpdateTextBoxOnOver, setUseAdvancedCriteria, setUseDisabledHintStyleForReadOnly, setUseLocalDisplayFieldValue, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValueDeselectedCSSText, setValueField, setValueFormatter, setValueHoverFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setVisibleWhen, setWarnOnEditorTypeConversion, setWarnOnEditorTypeConversionDefault, setWidth, setWidth, setWrapTitle, shouldApplyHeightToTextBox, shouldFetchMissingValue, shouldSaveOnEnter, shouldStopKeyPressBubbling, show, showIcon, showPicker, stopHover, storeValue, storeValue, updateState, validate, valueClipped
getRef, getRef, internalSetID
applyFactoryProperties, doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
public TimeItem()
public TimeItem(com.google.gwt.core.client.JavaScriptObject jsObj)
public TimeItem(java.lang.String name)
public TimeItem(java.lang.String name, java.lang.String title)
public static TimeItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties
.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties. For usage tips on this
param, see SGWTProperties
.AutoChildUsage
public static void changePickerIconDefaults(FormItemIcon defaults)
public SelectItem getAmpmItem()
useTextField
is false.
This component is an AutoChild named "ampmItem". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setAmpmItemProperties(SelectItem ampmItemProperties)
AM/PM picker
.
Note : This is an advanced setting
ampmItemProperties
- New ampmItemProperties value. Default value is nullpublic SelectItem getAmpmItemProperties()
AM/PM picker
.public void setAmpmItemTitle(java.lang.String ampmItemTitle)
AM/PM picker
.ampmItemTitle
- New ampmItemTitle value. Default value is "AM/PM"HTMLString
public java.lang.String getAmpmItemTitle()
AM/PM picker
.HTMLString
public void setBrowserInputType(java.lang.String browserInputType)
useTextField
is true and browserInputType is
set to "time", then a native HTML5 time input is used in place of a text input. The use of a native HTML5 time input causes
certain features to be disabled. Input masks and a custom timeFormatter
are not supported. In-field hints
are currently supported, but future
browser changes might force this support to be removed. Therefore, it is safest to not use in-field hints (set
showHintInField to false) in conjunction with a native HTML5 time input.
NOTE: This feature requires specific CSS changes. Currently these changes have been made to the Enterprise, EnterpriseBlue, and Graphite skins only.
Note : This is an advanced setting
setBrowserInputType
in class FormItem
browserInputType
- New browserInputType value. Default value is nullpublic java.lang.String getBrowserInputType()
useTextField
is true and browserInputType is
set to "time", then a native HTML5 time input is used in place of a text input. The use of a native HTML5 time input causes
certain features to be disabled. Input masks and a custom timeFormatter
are not supported. In-field hints
are currently supported, but future
browser changes might force this support to be removed. Therefore, it is safest to not use in-field hints (set
showHintInField to false) in conjunction with a native HTML5 time input.
NOTE: This feature requires specific CSS changes. Currently these changes have been made to the Enterprise, EnterpriseBlue, and Graphite skins only.
getBrowserInputType
in class FormItem
public void setHourIncrement(java.lang.Integer hourIncrement)
useTextField
is false and hourValues
is unset, this attribute specifies the
increment to use when generating entries for the hour picker. For example, if this attribute is set to 5, the hour
picker will contain only every fifth value between the hourMinValue
and hourMaxValue
.hourIncrement
- New hourIncrement value. Default value is nullpublic java.lang.Integer getHourIncrement()
useTextField
is false and hourValues
is unset, this attribute specifies the
increment to use when generating entries for the hour picker. For example, if this attribute is set to 5, the hour
picker will contain only every fifth value between the hourMinValue
and hourMaxValue
.public SelectItem getHourItem()
duration
when useTextField
is false.
This component is an AutoChild named "hourItem". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setHourItemPrompt(java.lang.String hourItemPrompt)
hour picker
.hourItemPrompt
- New hourItemPrompt value. Default value is "Choose hours"HTMLString
public java.lang.String getHourItemPrompt()
hour picker
.HTMLString
public void setHourItemProperties(SelectItem hourItemProperties)
hour picker
.
Note : This is an advanced setting
hourItemProperties
- New hourItemProperties value. Default value is nullpublic SelectItem getHourItemProperties()
hour picker
.public void setHourItemTitle(java.lang.String hourItemTitle)
hour picker
.hourItemTitle
- New hourItemTitle value. Default value is "Hour"HTMLString
public java.lang.String getHourItemTitle()
hour picker
.HTMLString
public void setHourMaxValue(java.lang.Integer hourMaxValue)
useTextField
is false and hourValues
is unset, this attribute specifies the
maximum value present in the hour picker. Used for specifying a limited set of valid Hour values, or when using the
TimeItem to record duration, rather than time per-se. The default is 11 or 23, according to the value of use24HourTime
and timeFormatter
.
See also hourMinValue
and hourIncrement
.
hourMaxValue
- New hourMaxValue value. Default value is nullpublic java.lang.Integer getHourMaxValue()
useTextField
is false and hourValues
is unset, this attribute specifies the
maximum value present in the hour picker. Used for specifying a limited set of valid Hour values, or when using the
TimeItem to record duration, rather than time per-se. The default is 11 or 23, according to the value of use24HourTime
and timeFormatter
.
See also hourMinValue
and hourIncrement
.
public void setHourMinValue(java.lang.Integer hourMinValue)
useTextField
is false and hourValues
is unset, this attribute specifies the
minimum value present in the hour picker. Used for specifying a limited set of valid Hour values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also hourMaxValue
and hourIncrement
.
hourMinValue
- New hourMinValue value. Default value is nullpublic java.lang.Integer getHourMinValue()
useTextField
is false and hourValues
is unset, this attribute specifies the
minimum value present in the hour picker. Used for specifying a limited set of valid Hour values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also hourMaxValue
and hourIncrement
.
public void setHourValues(int... hourValues)
hour
picker
when useTextField
is false. Used for specifying a limited set of valid Hour values, or when using the TimeItem to record duration, rather than time per-se.
See hourMinValue
, hourMaxValue
and hourIncrement
for another method of controlling the
content in the hour picker.
If this method is called after the component has been drawn/initialized:
Sets the array of valid hour values
to use when useTextField
is false.
Used for limiting available valid Hour values, or when using the TimeItem to record duration, rather than time per-se.
See hourMinValue
, hourMaxValue
and hourIncrement
for another method of controlling the content in the hour picker.
hourValues
- array of available Hour values. Default value is nullpublic int[] getHourValues()
hour
picker
when useTextField
is false. Used for specifying a limited set of valid Hour values, or when using the TimeItem to record duration, rather than time per-se.
See hourMinValue
, hourMaxValue
and hourIncrement
for another method of controlling the
content in the hour picker.
hourValues
or generated according to hourMinValue
, hourMaxValue
and hourIncrement
. Default value is nullpublic void setInvalidTimeStringMessage(java.lang.String invalidTimeStringMessage)
invalidTimeStringMessage
- New invalidTimeStringMessage value. Default value is "Invalid time"HTMLString
public java.lang.String getInvalidTimeStringMessage()
HTMLString
public void setMillisecondIncrement(java.lang.Integer millisecondIncrement)
useTextField
is false and millisecondValues
is unset, this attribute
specifies the increment to use when generating entries for the millisecond picker. For example, if this attribute is
set to 5, the millisecond picker will contain only every fifth value between the millisecondMinValue
and millisecondMaxValue
.millisecondIncrement
- New millisecondIncrement value. Default value is nullpublic java.lang.Integer getMillisecondIncrement()
useTextField
is false and millisecondValues
is unset, this attribute
specifies the increment to use when generating entries for the millisecond picker. For example, if this attribute is
set to 5, the millisecond picker will contain only every fifth value between the millisecondMinValue
and millisecondMaxValue
.public SelectItem getMillisecondItem()
duration
when useTextField
is false.
This component is an AutoChild named "millisecondItem". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setMillisecondItemPrompt(java.lang.String millisecondItemPrompt)
millisecond
picker
.millisecondItemPrompt
- New millisecondItemPrompt value. Default value is "Choose milliseconds"HTMLString
public java.lang.String getMillisecondItemPrompt()
millisecond
picker
.HTMLString
public void setMillisecondItemProperties(SelectItem millisecondItemProperties)
millisecond picker
.
Note : This is an advanced setting
millisecondItemProperties
- New millisecondItemProperties value. Default value is nullpublic SelectItem getMillisecondItemProperties()
millisecond picker
.public void setMillisecondItemTitle(java.lang.String millisecondItemTitle)
millisecond picker
.millisecondItemTitle
- New millisecondItemTitle value. Default value is "Ms"HTMLString
public java.lang.String getMillisecondItemTitle()
millisecond picker
.HTMLString
public void setMillisecondMaxValue(java.lang.Integer millisecondMaxValue)
useTextField
is false and millisecondValues
is unset, this attribute
specifies the maximum value present in the millisecond picker. Used for specifying a limited set of valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se. The default is 999.
See also millisecondMinValue
and millisecondIncrement
.
millisecondMaxValue
- New millisecondMaxValue value. Default value is nullpublic java.lang.Integer getMillisecondMaxValue()
useTextField
is false and millisecondValues
is unset, this attribute
specifies the maximum value present in the millisecond picker. Used for specifying a limited set of valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se. The default is 999.
See also millisecondMinValue
and millisecondIncrement
.
public void setMillisecondMinValue(java.lang.Integer millisecondMinValue)
useTextField
is false and millisecondValues
is unset, this attribute
specifies the minimum value present in the millisecond picker. Used for specifying a limited set of valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also millisecondMaxValue
and millisecondIncrement
.
millisecondMinValue
- New millisecondMinValue value. Default value is nullpublic java.lang.Integer getMillisecondMinValue()
useTextField
is false and millisecondValues
is unset, this attribute
specifies the minimum value present in the millisecond picker. Used for specifying a limited set of valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also millisecondMaxValue
and millisecondIncrement
.
public void setMillisecondValues(int... millisecondValues)
millisecond picker
when useTextField
is false.
Used for specifying a limited set of valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se.
See millisecondMinValue
, millisecondMaxValue
and millisecondIncrement
for another method of controlling the content in the millisecond picker.
If this method is called after the component has been drawn/initialized:
Sets the array of valid millisecond values
to use when useTextField
is false.
Used for limiting available valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se.
See millisecondMinValue
, millisecondMaxValue
and millisecondIncrement
for another method of controlling the content in the millisecond picker.
millisecondValues
- array of available Millisecond values. Default value is nullpublic int[] getMillisecondValues()
millisecond picker
when useTextField
is false.
Used for specifying a limited set of valid Millisecond values, or when using the TimeItem to record duration, rather than time per-se.
See millisecondMinValue
, millisecondMaxValue
and millisecondIncrement
for another method of controlling the content in the millisecond picker.
millisecondValues
or generated according to
millisecondMinValue
, millisecondMaxValue
and millisecondIncrement
. Default value is nullpublic void setMinuteIncrement(java.lang.Integer minuteIncrement)
useTextField
is false and minuteValues
is unset, this attribute specifies the
increment to use when generating entries for the minute picker. For example, if this attribute is set to 5, the minute
picker will contain only every fifth value between the minuteMinValue
and minuteMaxValue
.minuteIncrement
- New minuteIncrement value. Default value is nullpublic java.lang.Integer getMinuteIncrement()
useTextField
is false and minuteValues
is unset, this attribute specifies the
increment to use when generating entries for the minute picker. For example, if this attribute is set to 5, the minute
picker will contain only every fifth value between the minuteMinValue
and minuteMaxValue
.public SelectItem getMinuteItem()
duration
when useTextField
is false.
This component is an AutoChild named "minuteItem". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setMinuteItemPrompt(java.lang.String minuteItemPrompt)
minute picker
.minuteItemPrompt
- New minuteItemPrompt value. Default value is "Choose minutes"HTMLString
public java.lang.String getMinuteItemPrompt()
minute picker
.HTMLString
public void setMinuteItemProperties(SelectItem minuteItemProperties)
minute picker
.
Note : This is an advanced setting
minuteItemProperties
- New minuteItemProperties value. Default value is nullpublic SelectItem getMinuteItemProperties()
minute picker
.public void setMinuteItemTitle(java.lang.String minuteItemTitle)
minute picker
.minuteItemTitle
- New minuteItemTitle value. Default value is "Min"HTMLString
public java.lang.String getMinuteItemTitle()
minute picker
.HTMLString
public void setMinuteMaxValue(java.lang.Integer minuteMaxValue)
useTextField
is false and minuteValues
is unset, this attribute specifies the
maximum value present in the minute picker. Used for specifying a limited set of valid Minute values, or when using the TimeItem to record duration, rather than time per-se. The default 59.
See also minuteMinValue
and minuteIncrement
.
minuteMaxValue
- New minuteMaxValue value. Default value is nullpublic java.lang.Integer getMinuteMaxValue()
useTextField
is false and minuteValues
is unset, this attribute specifies the
maximum value present in the minute picker. Used for specifying a limited set of valid Minute values, or when using the TimeItem to record duration, rather than time per-se. The default 59.
See also minuteMinValue
and minuteIncrement
.
public void setMinuteMinValue(java.lang.Integer minuteMinValue)
useTextField
is false and minuteValues
is unset, this attribute specifies the
minimum value present in the minute picker. Used for specifying a limited set of valid Minute values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also minuteMaxValue
and minuteIncrement
.
minuteMinValue
- New minuteMinValue value. Default value is nullpublic java.lang.Integer getMinuteMinValue()
useTextField
is false and minuteValues
is unset, this attribute specifies the
minimum value present in the minute picker. Used for specifying a limited set of valid Minute values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also minuteMaxValue
and minuteIncrement
.
public void setMinuteValues(int... minuteValues)
minute
picker
when useTextField
is false. Used for specifying a limited set of valid Minute values, or when using the TimeItem to record duration, rather than time per-se.
See minuteMinValue
, minuteMaxValue
and minuteIncrement
for another method of controlling
the content in the minute picker.
If this method is called after the component has been drawn/initialized:
Sets the array of valid minute values
to use when useTextField
is false.
Used for limiting available valid Minute values, or when using the TimeItem to record duration, rather than time per-se.
See minuteMinValue
, minuteMaxValue
and minuteIncrement
for another method of controlling the content in the minute picker.
minuteValues
- array of available Minute values. Default value is nullpublic int[] getMinuteValues()
minute
picker
when useTextField
is false. Used for specifying a limited set of valid Minute values, or when using the TimeItem to record duration, rather than time per-se.
See minuteMinValue
, minuteMaxValue
and minuteIncrement
for another method of controlling
the content in the minute picker.
minuteValues
or generated according to minuteMinValue
, minuteMaxValue
and minuteIncrement
. Default value is nullpublic void setSecondIncrement(java.lang.Integer secondIncrement)
useTextField
is false and secondValues
is unset, this attribute specifies the
increment to use when generating entries for the second picker. For example, if this attribute is set to 5, the second
picker will contain only every fifth value between the secondMinValue
and secondMaxValue
.secondIncrement
- New secondIncrement value. Default value is nullpublic java.lang.Integer getSecondIncrement()
useTextField
is false and secondValues
is unset, this attribute specifies the
increment to use when generating entries for the second picker. For example, if this attribute is set to 5, the second
picker will contain only every fifth value between the secondMinValue
and secondMaxValue
.public SelectItem getSecondItem()
duration
when useTextField
is false.
This component is an AutoChild named "secondItem". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setSecondItemPrompt(java.lang.String secondItemPrompt)
second picker
.secondItemPrompt
- New secondItemPrompt value. Default value is "Choose seconds"HTMLString
public java.lang.String getSecondItemPrompt()
second picker
.HTMLString
public void setSecondItemProperties(SelectItem secondItemProperties)
seconds picker
.
Note : This is an advanced setting
secondItemProperties
- New secondItemProperties value. Default value is nullpublic SelectItem getSecondItemProperties()
seconds picker
.public void setSecondItemTitle(java.lang.String secondItemTitle)
second picker
.secondItemTitle
- New secondItemTitle value. Default value is "Sec"HTMLString
public java.lang.String getSecondItemTitle()
second picker
.HTMLString
public void setSecondMaxValue(java.lang.Integer secondMaxValue)
useTextField
is false and secondValues
is unset, this attribute specifies the
maximum value present in the second picker. Used for specifying a limited set of valid Second values, or when using the TimeItem to record duration, rather than time per-se. The default is 59.
See also secondMinValue
and secondIncrement
.
secondMaxValue
- New secondMaxValue value. Default value is nullpublic java.lang.Integer getSecondMaxValue()
useTextField
is false and secondValues
is unset, this attribute specifies the
maximum value present in the second picker. Used for specifying a limited set of valid Second values, or when using the TimeItem to record duration, rather than time per-se. The default is 59.
See also secondMinValue
and secondIncrement
.
public void setSecondMinValue(java.lang.Integer secondMinValue)
useTextField
is false and secondValues
is unset, this attribute specifies the
minimum value present in the second picker. Used for specifying a limited set of valid Second values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also secondMaxValue
and secondIncrement
.
secondMinValue
- New secondMinValue value. Default value is nullpublic java.lang.Integer getSecondMinValue()
useTextField
is false and secondValues
is unset, this attribute specifies the
minimum value present in the second picker. Used for specifying a limited set of valid Second values, or when using the TimeItem to record duration, rather than time per-se. The default is zero in all cases.
See also secondMaxValue
and secondIncrement
.
public void setSecondValues(int... secondValues)
second
picker
when useTextField
is false. Used for specifying a limited set of valid Second values, or when using the TimeItem to record duration, rather than time per-se.
See secondMinValue
, secondMaxValue
and secondIncrement
for another method of controlling
the content in the second picker.
If this method is called after the component has been drawn/initialized:
Sets the array of valid second values
to use when useTextField
is false.
Used for limiting available valid Second values, or when using the TimeItem to record duration, rather than time per-se.
See secondMinValue
, secondMaxValue
and secondIncrement
for another method of controlling the content in the second picker.
secondValues
- array of available Second values. Default value is nullpublic int[] getSecondValues()
second
picker
when useTextField
is false. Used for specifying a limited set of valid Second values, or when using the TimeItem to record duration, rather than time per-se.
See secondMinValue
, secondMaxValue
and secondIncrement
for another method of controlling
the content in the second picker.
secondValues
or generated according to secondMinValue
, secondMaxValue
and secondIncrement
. Default value is nullpublic void setShowHintInField(java.lang.Boolean showHintInField)
useTextField
is true and a hint
is set, should the hint be shown within the field?
Note that when using a native HTML5 time input (see browserInputType
), in-field hints are currently
supported, but future browser changes might not allow in-field hints to be supported. Therefore, it is safest to
not use in-field hints in conjunction with a native HTML5 time input.
To change this attribute after being
drawn, it is necessary to call FormItem.redraw()
or
redraw the form.
Note : This is an advanced setting
showHintInField
- New showHintInField value. Default value is nullFormItem.setHint(java.lang.String)
,
setUsePlaceholderForHint(boolean)
,
Appearance overview and related methods
public java.lang.Boolean getShowHintInField()
useTextField
is true and a hint
is set, should the hint be shown within the field?
Note that when using a native HTML5 time input (see browserInputType
), in-field hints are currently
supported, but future browser changes might not allow in-field hints to be supported. Therefore, it is safest to
not use in-field hints in conjunction with a native HTML5 time input.
To change this attribute after being
drawn, it is necessary to call FormItem.redraw()
or
redraw the form.
FormItem.getHint()
,
getUsePlaceholderForHint()
,
Appearance overview and related methods
public void setShowHourItem(java.lang.Boolean showHourItem)
hourItem
when
useTextField
is false.showHourItem
- New showHourItem value. Default value is truepublic java.lang.Boolean getShowHourItem()
hourItem
when
useTextField
is false.public void setShowMillisecondItem(java.lang.Boolean showMillisecondItem)
millisecondItem
when useTextField
is false.showMillisecondItem
- New showMillisecondItem value. Default value is falsepublic java.lang.Boolean getShowMillisecondItem()
millisecondItem
when useTextField
is false.public void setShowMinuteItem(java.lang.Boolean showMinuteItem)
minuteItem
when
useTextField
is false.showMinuteItem
- New showMinuteItem value. Default value is truepublic java.lang.Boolean getShowMinuteItem()
minuteItem
when
useTextField
is false.public void setShowSecondItem(java.lang.Boolean showSecondItem)
secondItem
when
useTextField
is false.showSecondItem
- New showSecondItem value. Default value is truepublic java.lang.Boolean getShowSecondItem()
secondItem
when
useTextField
is false.public void setTextAlign(Alignment textAlign)
useTextField
is true
, this
property governs the alignment of text within the text field. Defaults to "left"
by default or
"right"
if the page is in rtl mode
. This attribute does not
have an effect if a native HTML5 time input is being used. See browserInputType
.
setTextAlign
in class FormItem
textAlign
- New textAlign value. Default value is variesFormItem.setApplyAlignToText(boolean)
,
Appearance overview and related methods
public Alignment getTextAlign()
useTextField
is true
, this
property governs the alignment of text within the text field. Defaults to "left"
by default or
"right"
if the page is in rtl mode
. This attribute does not
have an effect if a native HTML5 time input is being used. See browserInputType
.
getTextAlign
in class FormItem
FormItem.getApplyAlignToText()
,
Appearance overview and related methods
public void setTextBoxStyle(java.lang.String textBoxStyle)
textField
if useTextField
is set to true
.setTextBoxStyle
in class FormItem
textBoxStyle
- New textBoxStyle value. Default value is nullCSSStyleName
public java.lang.String getTextBoxStyle()
textField
if useTextField
is set to true
.getTextBoxStyle
in class FormItem
CSSStyleName
public TextItem getTextField()
useTextField
is true.
This component is an AutoChild named "textField". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
public void setTextFieldProperties(TextItem textFieldProperties)
text field
generated for this timeItem when useTextField
is true.
Note : This is an advanced setting
textFieldProperties
- New textFieldProperties value. Default value is nullpublic TextItem getTextFieldProperties()
text field
generated for this timeItem when useTextField
is true.public void setTimeFormatter(TimeDisplayFormat timeFormatter)
useTextField
is true, what format should
this item's time string be presented in? If unset, the default formatter will be timeFormatter24Hour
or timeFormatter12Hour
depending on the value of
use24HourTime
. If the property cannot be
derived in this way (none of these properties are set), we'll check DynamicForm.timeFormatter
, or finally back off to the
standard system-wide String will be applied.
This attribute does not have an effect if a native HTML5 time input is
being used. See browserInputType
.
setTimeFormatter
in class FormItem
timeFormatter
- New timeFormatter value. Default value is nullFormItem.setFormat(java.lang.String)
,
Appearance overview and related methods
public TimeDisplayFormat getTimeFormatter()
useTextField
is true, what format should
this item's time string be presented in? If unset, the default formatter will be timeFormatter24Hour
or timeFormatter12Hour
depending on the value of
use24HourTime
. If the property cannot be
derived in this way (none of these properties are set), we'll check DynamicForm.timeFormatter
, or finally back off to the
standard system-wide String will be applied.
This attribute does not have an effect if a native HTML5 time input is
being used. See browserInputType
.
getTimeFormatter
in class FormItem
FormItem.getFormat()
,
Appearance overview and related methods
public void setTimeFormatter12Hour(TimeDisplayFormat timeFormatter12Hour)
useTextField
is true, and use24HourTime
is false, what format should this
item's time string be presented in? May be overridden via an explicitly specified timeFormatter
.
This attribute does not have an
effect if a native HTML5 time input is being used. See browserInputType
.
timeFormatter12Hour
- New timeFormatter12Hour value. Default value is "toShortTime"public TimeDisplayFormat getTimeFormatter12Hour()
useTextField
is true, and use24HourTime
is false, what format should this
item's time string be presented in? May be overridden via an explicitly specified timeFormatter
.
This attribute does not have an
effect if a native HTML5 time input is being used. See browserInputType
.
public void setTimeFormatter24Hour(TimeDisplayFormat timeFormatter24Hour)
useTextField
is true, and use24HourTime
is true, what format should this item's
time string be presented in? May be overridden via an explicitly specified timeFormatter
.
This attribute does not have an
effect if a native HTML5 time input is being used. See browserInputType
.
timeFormatter24Hour
- New timeFormatter24Hour value. Default value is "toShort24HourTime"public TimeDisplayFormat getTimeFormatter24Hour()
useTextField
is true, and use24HourTime
is true, what format should this item's
time string be presented in? May be overridden via an explicitly specified timeFormatter
.
This attribute does not have an
effect if a native HTML5 time input is being used. See browserInputType
.
public void setUse24HourTime(java.lang.Boolean use24HourTime)
use24HourTime
- New use24HourTime value. Default value is nullpublic java.lang.Boolean getUse24HourTime()
public 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").
This attribute
does not have an effect if a native HTML5 time input is being used. See browserInputType
.
Note : This is an advanced setting
useMask
- New useMask value. 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").
This attribute
does not have an effect if a native HTML5 time input is being used. See browserInputType
.
public void setUsePlaceholderForHint(boolean usePlaceholderForHint)
showing the hint in field
and if
supported by the browser, should the HTML5
placeholder
attribute
be used to display the hint within the field? If set to false
, then use of
the placeholder
attribute is disabled and an alternative technique to display
the hint in-field is used instead.
The HTML5 placeholder
attribute is supported in the following major browsers:
WebView
(used by the stock Browser app and when
packaging with PhoneGap
)In browsers other than the above, in-field hints are implemented via a different technique.
Note that placeholder behavior is known to differ in Internet Explorer and certain old
versions of the above browsers due to a recent change in the HTML5 specification regarding
the placeholder
attribute. Under the old rules, the placeholder is cleared
when the element is focused. In the latest HTML5 spec as published by WHATWG, the placeholder
is still displayed when the element is focused as long as the value is an empty string.
Browser | Pseudo-class or pseudo-element |
---|---|
Chrome, Safari | ::-webkit-input-placeholder |
Firefox 4 - 18 | :-moz-placeholder |
Firefox 19+ | ::-moz-placeholder |
Internet Explorer | :-ms-input-placeholder |
Note that unlike other browsers, Firefox 19+ applies opacity:0.4 to the placeholder text. See Bug 556145 - Placeholder text default style should use opacity instead of GrayText
Because browsers are required to ignore the entire rule if a selector is invalid, separate rules are needed for each browser. For example:
::-webkit-input-placeholder { color: blue; opacity: 1; } :-moz-placeholder { color: blue; opacity: 1; } ::-moz-placeholder { color: blue; opacity: 1; } :-ms-input-placeholder { color: blue; opacity: 1; }
If using Sass, it may be useful to utilize Sass' parent selector feature. For example:
.myCustomItem, .myCustomItemRTL, .myCustomItemDisabled, .myCustomItemDisabledRTL, .myCustomItemError, .myCustomItemErrorRTL, .myCustomItemFocused, .myCustomItemFocusedRTL, .myCustomItemHint, .myCustomItemHintRTL, .myCustomItemDisabledHint, .myCustomItemDisabledHintRTL { // ... &::-webkit-input-placeholder { color: blue; opacity: 1; } &:-moz-placeholder { color: blue; opacity: 1; } &::-moz-placeholder { color: blue; opacity: 1; } &:-ms-input-placeholder { color: blue; opacity: 1; } }
If using Compass, the
input-placeholder
mixin
that was added in version 1.0 can further simplify the code to style the placeholder text
For example:
.myCustomItem, .myCustomItemRTL, .myCustomItemDisabled, .myCustomItemDisabledRTL, .myCustomItemError, .myCustomItemErrorRTL, .myCustomItemFocused, .myCustomItemFocusedRTL, .myCustomItemHint, .myCustomItemHintRTL, .myCustomItemDisabledHint, .myCustomItemDisabledHintRTL { // ... @include input-placeholder { color: blue; opacity: 1; } }
Note : This is an advanced setting
usePlaceholderForHint
- New usePlaceholderForHint value. Default value is trueFormItem.setHint(java.lang.String)
,
Appearance overview and related methods
public boolean getUsePlaceholderForHint()
showing the hint in field
and if
supported by the browser, should the HTML5
placeholder
attribute
be used to display the hint within the field? If set to false
, then use of
the placeholder
attribute is disabled and an alternative technique to display
the hint in-field is used instead.
The HTML5 placeholder
attribute is supported in the following major browsers:
WebView
(used by the stock Browser app and when
packaging with PhoneGap
)In browsers other than the above, in-field hints are implemented via a different technique.
Note that placeholder behavior is known to differ in Internet Explorer and certain old
versions of the above browsers due to a recent change in the HTML5 specification regarding
the placeholder
attribute. Under the old rules, the placeholder is cleared
when the element is focused. In the latest HTML5 spec as published by WHATWG, the placeholder
is still displayed when the element is focused as long as the value is an empty string.
Browser | Pseudo-class or pseudo-element |
---|---|
Chrome, Safari | ::-webkit-input-placeholder |
Firefox 4 - 18 | :-moz-placeholder |
Firefox 19+ | ::-moz-placeholder |
Internet Explorer | :-ms-input-placeholder |
Note that unlike other browsers, Firefox 19+ applies opacity:0.4 to the placeholder text. See Bug 556145 - Placeholder text default style should use opacity instead of GrayText
Because browsers are required to ignore the entire rule if a selector is invalid, separate rules are needed for each browser. For example:
::-webkit-input-placeholder { color: blue; opacity: 1; } :-moz-placeholder { color: blue; opacity: 1; } ::-moz-placeholder { color: blue; opacity: 1; } :-ms-input-placeholder { color: blue; opacity: 1; }
If using Sass, it may be useful to utilize Sass' parent selector feature. For example:
.myCustomItem, .myCustomItemRTL, .myCustomItemDisabled, .myCustomItemDisabledRTL, .myCustomItemError, .myCustomItemErrorRTL, .myCustomItemFocused, .myCustomItemFocusedRTL, .myCustomItemHint, .myCustomItemHintRTL, .myCustomItemDisabledHint, .myCustomItemDisabledHintRTL { // ... &::-webkit-input-placeholder { color: blue; opacity: 1; } &:-moz-placeholder { color: blue; opacity: 1; } &::-moz-placeholder { color: blue; opacity: 1; } &:-ms-input-placeholder { color: blue; opacity: 1; } }
If using Compass, the
input-placeholder
mixin
that was added in version 1.0 can further simplify the code to style the placeholder text
For example:
.myCustomItem, .myCustomItemRTL, .myCustomItemDisabled, .myCustomItemDisabledRTL, .myCustomItemError, .myCustomItemErrorRTL, .myCustomItemFocused, .myCustomItemFocusedRTL, .myCustomItemHint, .myCustomItemHintRTL, .myCustomItemDisabledHint, .myCustomItemDisabledHintRTL { // ... @include input-placeholder { color: blue; opacity: 1; } }
FormItem.getHint()
,
Appearance overview and related methods
public void setUseTextField(java.lang.Boolean useTextField)
useTextField
- New useTextField value. Default value is truepublic java.lang.Boolean getUseTextField()
public void setWrapHintText(java.lang.Boolean wrapHintText)
FormItem.hint
, should the
hint text be allowed to wrap? Setting this property to false
will render the hint on a single line without
wrapping, expanding the width required to render the item if necessary. If unset this property will be picked up
from the DynamicForm.wrapHintText
setting.
This
setting does not apply to hints that are shown in field
.
setWrapHintText
in class FormItem
wrapHintText
- New wrapHintText value. Default value is falseFormItem.setMinHintWidth(java.lang.Integer)
public java.lang.Boolean getWrapHintText()
FormItem.hint
, should the
hint text be allowed to wrap? Setting this property to false
will render the hint on a single line without
wrapping, expanding the width required to render the item if necessary. If unset this property will be picked up
from the DynamicForm.wrapHintText
setting.
This
setting does not apply to hints that are shown in field
.
getWrapHintText
in class FormItem
FormItem.getMinHintWidth()
public void deselectValue()
useTextField
is true, falls through to
standard deselectValue()
implementation on this
items freeform text entry field. Otherwise has no effect.public void deselectValue(java.lang.Boolean start)
useTextField
is true, falls through to
standard deselectValue()
implementation on this
items freeform text entry field. Otherwise has no effect.start
- If this parameter is passed, new cursor insertion position will be moved to the start, rather than the end of this
item's value.public int getDuration()
useTextField
is set to false, this method
returns the value of the time expressed as a duration in the timeUnit
provided. If no timeUnit is passed, the default is the smallest unit for which a picker is visible.public int getDuration(TimeUnit timeUnit)
useTextField
is set to false, this method
returns the value of the time expressed as a duration in the timeUnit
provided. If no timeUnit is passed, the default is the smallest unit for which a picker is visible.timeUnit
- the unit of the return valuepublic java.lang.String getEnteredValue()
useTextField
is true (otherwise returns the result of
this.getValue()).public boolean pendingStatusChanged(DynamicForm form, FormItem item, boolean pendingStatus, java.lang.Object newValue, java.lang.Object value)
showPending
is
enabled and this time item should either clear or show its pending visual state. The default behavior is that the
titleStyle
and cellStyle
are updated to include/exclude the "Pending"
suffix. In addition, when displayed in the pending state:
useTextField
is true
, then the "Pending"
suffix will be appended to the textBoxStyle
applied to the textField
; otherwise
useTextField
is false
) the color of the hourItem
, minuteItem
, secondItem
, millisecondItem
, and/or ampmItem
will change when the hour, minute, second,
millisecond, or whether the time is AM or PM is different, respectively. false
will cancel
this default behavior.form
- the managing DynamicForm
instance.item
- the form item itself (also available as "this").pendingStatus
- true
if the item should show its pending visual state; false
otherwise.newValue
- the current form item value.value
- the value that would be restored by a call to DynamicForm.resetValues()
.false
to cancel the default behavior.public void selectValue()
useTextField
is true, falls through to
standard selectValue()
implementation on this items
freeform text entry field. Otherwise has no effect.public void setHours(int hours)
setValue()
, the minute will be established to current
minute. You can use setValue()
to set both hours
and minutes at the same time.
setHours() cannot be called until the item has been added to a DynamicForm and the form has been drawn.
hours
- new hours value for this TimeItem.public void setMilliseconds(int milliseconds)
milliseconds
- new milliseconds value for this TimeItem.public void setMinutes(int minutes)
setValue()
, the hour will be established to current hour.
You can use setValue()
to set both hours and
minutes at the same time.
setMinutes() cannot be called until the item has been added to a DynamicForm and the form has been drawn.
minutes
- new minutes value for this TimeItem.public void setSeconds(int seconds)
seconds
- new seconds value for this TimeItem.public void setSelectionRange(int start, int end)
useTextField
is true, falls through to
standard setSelectionRange
implementation on
this items freeform text entry field. Otherwise has no effect.start
- character index for start of new selectionend
- character index for end of new selectionpublic static void setDefaultProperties(TimeItem timeItemProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
timeItemProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
public java.util.Date getValueAsDate()
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)
@Deprecated public void setDisplayFormat(TimeDisplayFormat timeFormatter)
getTimeFormatter()
instead.TimeDisplayFormat
- displayFormat Default value is "toShort24HourTime"@Deprecated public TimeDisplayFormat getDisplayFormat()
setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat)
instead.public int[] getSelectionRange()
useTextField
is true, falls through to
standard com.smartgwt.client.widgets.form.fields.FormItem#getSelectionRange
implementation on this item's
freeform text entry field. Otherwise has no effect.