Package io.jmix.ui.component
Interface TimeField<V>
- Type Parameters:
V- type of value
- All Superinterfaces:
Buffered,Component,Component.BelongToFrame,Component.Editable,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,Field<V>,HasContextHelp,HasDatatype<V>,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasValidator<V>,HasValue<V>,HasValueSource<V>,Requirable,Validatable
- All Known Implementing Classes:
TimeFieldImpl
@StudioComponent(caption="TimeField",
category="Components",
xmlElement="timeField",
icon="io/jmix/ui/icon/component/timeField.svg",
canvasBehaviour=TIME_FIELD,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/time-field.html")
public interface TimeField<V>
extends Field<V>, HasDatatype<V>, Buffered, Component.Focusable
A time entry component, which displays the actual time.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumDefines component time mode (12h AP/PM or 24h).Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.springframework.core.ParameterizedTypeReference<TimeField<OffsetTime>>Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionReturns the time format of the TimeField.Returns the resolution of the TimeField.voidSets the time format of the TimeField.voidsetResolution(TimeField.Resolution resolution) Sets the resolution of the TimeField.voidsetTimeMode(TimeField.TimeMode timeMode) Sets time mode to use (12h AM/PM or 24h).Methods inherited from interface io.jmix.ui.component.Buffered
commit, discard, isBuffered, isModified, setBufferedMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasDatatype
getDatatype, setDatatypeMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidatorMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSourceMethods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessageMethods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
NAME
- See Also:
-
TYPE_DEFAULT
-
TYPE_TIME
-
TYPE_LOCALTIME
-
TYPE_OFFSETTIME
static final org.springframework.core.ParameterizedTypeReference<TimeField<OffsetTime>> TYPE_OFFSETTIME
-
-
Method Details
-
getResolution
TimeField.Resolution getResolution()Returns the resolution of the TimeField.- Returns:
- Resolution
-
setResolution
@StudioProperty(type=ENUMERATION, defaultValue="MIN", options={"HOUR","MIN","SEC"}) void setResolution(TimeField.Resolution resolution) Sets the resolution of the TimeField.- Parameters:
resolution- resolution
-
getFormat
String getFormat()Returns the time format of the TimeField.- Returns:
- time format
-
setFormat
Sets the time format of the TimeField. It can be either a format string, or a key in message group.- Parameters:
timeFormat- time format
-
setTimeMode
@StudioProperty(type=ENUMERATION, defaultValue="H_24", options={"H_12","H_24"}) void setTimeMode(TimeField.TimeMode timeMode) Sets time mode to use (12h AM/PM or 24h).By default the 24h mode is used.
- Parameters:
timeMode- time mode
-
getTimeMode
TimeField.TimeMode getTimeMode()- Returns:
TimeField.TimeModethat is used by component
-