public class JmixTimeFieldWrapper
extends com.vaadin.ui.CustomField<java.time.LocalTime>
JmixTimeField
and AM / PM combobox.Modifier and Type | Class and Description |
---|---|
static class |
JmixTimeFieldWrapper.AmPmLocalTime
Immutable POJO to store time in AM/PM format.
|
com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.HasContextHelp, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
com.vaadin.server.Sizeable.Unit
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AM_PM_FIELD_STYLE_NAME |
protected JmixComboBox<AmPm> |
amPmField |
protected JmixCssActionsLayout |
container |
protected java.time.LocalTime |
internalValue |
static java.lang.String |
TIME_FIELD_LAYOUT_STYLENAME |
static java.lang.String |
TIME_FIELD_STYLENAME |
protected JmixTimeField |
timeField |
protected TimeMode |
timeMode |
Constructor and Description |
---|
JmixTimeFieldWrapper() |
Modifier and Type | Method and Description |
---|---|
protected void |
amPmFieldValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<AmPm> event) |
protected void |
componentValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<java.time.LocalTime> event) |
protected java.time.LocalTime |
constructModelValue(java.time.LocalTime value) |
protected static java.time.LocalTime |
convertFrom12hFormat(JmixTimeFieldWrapper.AmPmLocalTime amPmTime) |
protected static JmixTimeFieldWrapper.AmPmLocalTime |
convertTo12hFormat(java.time.LocalTime time) |
protected java.time.LocalTime |
convertToModel(JmixTimeFieldWrapper.AmPmLocalTime presentationValue) |
protected JmixTimeFieldWrapper.AmPmLocalTime |
convertToPresentation(java.time.LocalTime modelValue) |
protected void |
doSetValue(java.time.LocalTime value) |
java.util.function.Supplier<com.vaadin.server.ErrorMessage> |
getComponentErrorProvider() |
TimeResolution |
getResolution() |
java.lang.String |
getTimeFormat() |
TimeMode |
getTimeMode() |
java.time.LocalTime |
getValue() |
protected void |
init() |
protected void |
initAmPmField() |
protected com.vaadin.ui.Component |
initContent() |
protected void |
initLayout() |
protected void |
initTimeField() |
boolean |
isCaptionManagedByLayout() |
boolean |
isReadOnly() |
void |
setCaptionManagedByLayout(boolean captionManagedByLayout) |
void |
setComponentErrorProvider(java.util.function.Supplier<com.vaadin.server.ErrorMessage> componentErrorProvider) |
void |
setReadOnly(boolean readOnly) |
void |
setResolution(TimeResolution resolution) |
void |
setTimeFormat(java.lang.String format) |
void |
setTimeMode(TimeMode timeMode) |
protected void |
setValueToPresentation(JmixTimeFieldWrapper.AmPmLocalTime value) |
attach, focus, getContent, getState, getState, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth
addValueChangeListener, createValueChange, getCustomAttributes, isDifferentValue, isRequiredIndicatorVisible, readDesign, setRequiredIndicatorVisible, setValue, setValue, writeDesign
addContextClickListener, addContextHelpIconClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, detach, ensureContextHelpInitialized, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireContextHelpClick, getActionManager, getCaption, getComponentError, getContextHelpText, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getRequiredError, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isContextHelpTextHtmlEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setContextHelpText, setContextHelpTextHtmlEnabled, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setJTestId, setLocale, setParent, setPrimaryStyleName, setRequiredError, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setJTestId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
public static final java.lang.String TIME_FIELD_STYLENAME
public static final java.lang.String TIME_FIELD_LAYOUT_STYLENAME
public static final java.lang.String AM_PM_FIELD_STYLE_NAME
protected JmixCssActionsLayout container
protected JmixTimeField timeField
protected JmixComboBox<AmPm> amPmField
protected java.time.LocalTime internalValue
protected TimeMode timeMode
@Nullable public java.time.LocalTime getValue()
public void setReadOnly(boolean readOnly)
setReadOnly
in interface com.vaadin.data.HasValue<java.time.LocalTime>
setReadOnly
in class com.vaadin.ui.AbstractField<java.time.LocalTime>
public void setComponentErrorProvider(java.util.function.Supplier<com.vaadin.server.ErrorMessage> componentErrorProvider)
setComponentErrorProvider
in class com.vaadin.ui.AbstractComponent
public java.util.function.Supplier<com.vaadin.server.ErrorMessage> getComponentErrorProvider()
getComponentErrorProvider
in class com.vaadin.ui.AbstractComponent
public boolean isReadOnly()
isReadOnly
in interface com.vaadin.data.HasValue<java.time.LocalTime>
isReadOnly
in class com.vaadin.ui.AbstractField<java.time.LocalTime>
public void setTimeFormat(java.lang.String format)
public java.lang.String getTimeFormat()
public void setResolution(TimeResolution resolution)
public TimeResolution getResolution()
public TimeMode getTimeMode()
public void setTimeMode(TimeMode timeMode)
public boolean isCaptionManagedByLayout()
public void setCaptionManagedByLayout(boolean captionManagedByLayout)
protected com.vaadin.ui.Component initContent()
initContent
in class com.vaadin.ui.CustomField<java.time.LocalTime>
protected void doSetValue(java.time.LocalTime value)
doSetValue
in class com.vaadin.ui.AbstractField<java.time.LocalTime>
protected void init()
protected void initTimeField()
protected void initAmPmField()
protected void initLayout()
protected void componentValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<java.time.LocalTime> event)
protected void amPmFieldValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<AmPm> event)
protected java.time.LocalTime constructModelValue(java.time.LocalTime value)
protected void setValueToPresentation(@Nullable JmixTimeFieldWrapper.AmPmLocalTime value)
@Nullable protected java.time.LocalTime convertToModel(@Nullable JmixTimeFieldWrapper.AmPmLocalTime presentationValue)
@Nullable protected JmixTimeFieldWrapper.AmPmLocalTime convertToPresentation(@Nullable java.time.LocalTime modelValue)
protected static java.time.LocalTime convertFrom12hFormat(JmixTimeFieldWrapper.AmPmLocalTime amPmTime)
protected static JmixTimeFieldWrapper.AmPmLocalTime convertTo12hFormat(java.time.LocalTime time)