public class TimeFieldImpl<V> extends AbstractField<JmixTimeFieldWrapper,java.time.LocalTime,V> implements TimeField<V>, org.springframework.beans.factory.InitializingBean
TimeField.Resolution, TimeField.TimeModeHasValue.ValueChangeEvent<V>Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperHasContextHelp.ContextHelpIconClickEvent| Modifier and Type | Field and Description |
|---|---|
protected DataAwareComponentsTools |
dataAwareComponentsTools |
protected io.jmix.core.metamodel.datatype.Datatype<V> |
datatype |
protected io.jmix.core.DateTimeTransformations |
dateTimeTransformations |
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITYinternalValue, uiTestIdsSupport, valueBindingalignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentNAME, TYPE_DEFAULT, TYPE_LOCALTIME, TYPE_OFFSETTIME, TYPE_TIMEAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| Constructor and Description |
|---|
TimeFieldImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
commit()
Updates all changes since the previous commit to the data source.
|
protected void |
componentValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<java.time.LocalTime> e) |
protected V |
constructModelValue() |
protected java.lang.Object |
convertFromLocalTime(java.time.LocalTime localTime,
java.lang.Class javaType) |
protected java.time.LocalTime |
convertToPresentation(V modelValue) |
protected JmixTimeFieldWrapper |
createComponent() |
void |
discard()
Discards all changes since last commit.
|
void |
focus()
Sets focus to this component
|
io.jmix.core.metamodel.datatype.Datatype<V> |
getDatatype() |
java.lang.String |
getFormat()
Returns the time format of the TimeField.
|
TimeField.Resolution |
getResolution()
Returns the resolution of the TimeField.
|
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
TimeField.TimeMode |
getTimeMode() |
boolean |
isBuffered() |
boolean |
isModified()
Tests if the value stored in the object has been modified since it was
last updated from the data source.
|
void |
setBuffered(boolean buffered)
Sets the buffered mode.
|
void |
setDataAwareComponentsTools(DataAwareComponentsTools dataAwareComponentsTools) |
void |
setDatatype(io.jmix.core.metamodel.datatype.Datatype<V> datatype)
Sets the given
datatype to the component. |
void |
setFormat(java.lang.String format)
Sets the time format of the TimeField.
|
void |
setResolution(TimeField.Resolution resolution)
Sets the resolution of the TimeField.
|
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
void |
setTimeMode(TimeField.TimeMode timeMode)
Sets time mode to use (12h AM/PM or 24h).
|
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validateaddValueChangeListener, componentValueChanged, convertToModel, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnectedaddAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetValueSource, setValueSourceaddValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueisEditable, isEditableWithParent, setEditablegetFrame, setFrameaddStyleName, 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, withUnwrappedCompositionisValid, isValidateOnCommit, validategetIcon, setIcon, setIconFromSetgetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledaddValidator, addValidators, getValidators, removeValidatorgetRequiredMessage, isRequired, setRequired, setRequiredMessageisFocusable, setFocusable@Autowired protected io.jmix.core.DateTimeTransformations dateTimeTransformations
protected DataAwareComponentsTools dataAwareComponentsTools
protected io.jmix.core.metamodel.datatype.Datatype<V> datatype
@Autowired public void setDataAwareComponentsTools(DataAwareComponentsTools dataAwareComponentsTools)
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void setFormat(java.lang.String format)
TimeFieldpublic java.lang.String getFormat()
TimeFieldpublic TimeField.Resolution getResolution()
TimeFieldgetResolution in interface TimeField<V>public void setResolution(TimeField.Resolution resolution)
TimeFieldsetResolution in interface TimeField<V>resolution - resolution@Nullable public io.jmix.core.metamodel.datatype.Datatype<V> getDatatype()
getDatatype in interface HasDatatype<V>public void setDatatype(io.jmix.core.metamodel.datatype.Datatype<V> datatype)
HasDatatypedatatype to the component. Its value will be formatted according to this
datatype.setDatatype in interface HasDatatype<V>datatype - Datatype instancepublic void focus()
Component.Focusablefocus in interface Component.Focusablepublic int getTabIndex()
Component.FocusableHasTabIndex component.getTabIndex in interface Component.FocusableHasTabIndex componentpublic void setTabIndex(int tabIndex)
Component.FocusableFocusable component.
The tab index property is used to specify the order in which the
fields are focused when the user presses the Tab key. Components with
a defined tab index are focused sequentially first, and then the
components with no tab index.setTabIndex in interface Component.FocusabletabIndex - tab indexpublic void setTimeMode(TimeField.TimeMode timeMode)
TimeFieldBy default the 24h mode is used.
setTimeMode in interface TimeField<V>timeMode - time modepublic TimeField.TimeMode getTimeMode()
getTimeMode in interface TimeField<V>TimeField.TimeMode that is used by componentpublic void commit()
Bufferedcommit in interface Bufferedcommit in class AbstractValueComponent<JmixTimeFieldWrapper,java.time.LocalTime,V>public void discard()
Buffereddiscard in interface Buffereddiscard in class AbstractValueComponent<JmixTimeFieldWrapper,java.time.LocalTime,V>public boolean isBuffered()
isBuffered in interface BufferedisBuffered in class AbstractValueComponent<JmixTimeFieldWrapper,java.time.LocalTime,V>true if buffered mode is on, false otherwisepublic void setBuffered(boolean buffered)
Buffered
When in buffered mode, an internal buffer will be used to store changes
until Buffered.commit() is called. Calling Buffered.discard() will revert
the internal buffer to the value of the data source.
When in non-buffered mode both read and write operations will be done
directly on the data source. In this mode the Buffered.commit() and
Buffered.discard() methods serve no purpose.
setBuffered in interface BufferedsetBuffered in class AbstractValueComponent<JmixTimeFieldWrapper,java.time.LocalTime,V>buffered - true if buffered mode should be turned on, false otherwisepublic boolean isModified()
BufferedisModified in interface BufferedisModified in class AbstractValueComponent<JmixTimeFieldWrapper,java.time.LocalTime,V>true if the value in the object has been modified
since the last data source update, false if not.@Nullable
protected java.time.LocalTime convertToPresentation(@Nullable
V modelValue)
throws ConversionException
convertToPresentation in class AbstractValueComponent<JmixTimeFieldWrapper,java.time.LocalTime,V>ConversionExceptionprotected JmixTimeFieldWrapper createComponent()
protected void componentValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<java.time.LocalTime> e)
@Nullable protected V constructModelValue()
protected java.lang.Object convertFromLocalTime(java.time.LocalTime localTime,
java.lang.Class javaType)