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
Modifier and TypeInterfaceDescriptionstatic enum
static enum
Defines 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static 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.void
Sets the time format of the TimeField.void
setResolution
(TimeField.Resolution resolution) Sets the resolution of the TimeField.void
setTimeMode
(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, setBuffered
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasDatatype
getDatatype, setDatatype
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods 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.TimeMode
that is used by component
-