public class CubaTimeFieldWrapper
extends com.vaadin.ui.CustomField<java.time.LocalTime>
CubaTimeField
and AM / PM combobox.Modifier and Type | Class and Description |
---|---|
static class |
CubaTimeFieldWrapper.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 CubaComboBox<com.haulmont.cuba.web.widgets.client.timefield.AmPm> |
amPmField |
protected CubaCssActionsLayout |
container |
protected java.time.LocalTime |
internalValue |
static java.lang.String |
TIME_FIELD_LAYOUT_STYLENAME |
static java.lang.String |
TIME_FIELD_STYLENAME |
protected CubaTimeField |
timeField |
protected com.haulmont.cuba.web.widgets.client.timefield.TimeMode |
timeMode |
Constructor and Description |
---|
CubaTimeFieldWrapper() |
Modifier and Type | Method and Description |
---|---|
protected void |
amPmFieldValueChanged(com.vaadin.data.HasValue.ValueChangeEvent<com.haulmont.cuba.web.widgets.client.timefield.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(CubaTimeFieldWrapper.AmPmLocalTime amPmTime) |
protected static CubaTimeFieldWrapper.AmPmLocalTime |
convertTo12hFormat(java.time.LocalTime time) |
protected java.time.LocalTime |
convertToModel(CubaTimeFieldWrapper.AmPmLocalTime presentationValue) |
protected CubaTimeFieldWrapper.AmPmLocalTime |
convertToPresentation(java.time.LocalTime modelValue) |
protected void |
doSetValue(java.time.LocalTime value) |
java.util.function.Supplier<com.vaadin.server.ErrorMessage> |
getComponentErrorProvider() |
com.haulmont.cuba.web.widgets.client.timefield.TimeResolution |
getResolution() |
java.lang.String |
getTimeFormat() |
com.haulmont.cuba.web.widgets.client.timefield.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(com.haulmont.cuba.web.widgets.client.timefield.TimeResolution resolution) |
void |
setTimeFormat(java.lang.String format) |
void |
setTimeMode(com.haulmont.cuba.web.widgets.client.timefield.TimeMode timeMode) |
protected void |
setValueToPresentation(CubaTimeFieldWrapper.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, getCubaId, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getRequiredError, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isContextHelpTextHtmlEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setContextHelpText, setContextHelpTextHtmlEnabled, setCubaId, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, 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, getCubaId, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setCubaId, setEnabled, setIcon, setId, 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 CubaCssActionsLayout container
protected CubaTimeField timeField
protected CubaComboBox<com.haulmont.cuba.web.widgets.client.timefield.AmPm> amPmField
protected java.time.LocalTime internalValue
protected com.haulmont.cuba.web.widgets.client.timefield.TimeMode timeMode
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 boolean isReadOnly()
isReadOnly
in interface com.vaadin.data.HasValue<java.time.LocalTime>
isReadOnly
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 void setTimeFormat(java.lang.String format)
public java.lang.String getTimeFormat()
public void setResolution(com.haulmont.cuba.web.widgets.client.timefield.TimeResolution resolution)
public com.haulmont.cuba.web.widgets.client.timefield.TimeResolution getResolution()
public com.haulmont.cuba.web.widgets.client.timefield.TimeMode getTimeMode()
public void setTimeMode(com.haulmont.cuba.web.widgets.client.timefield.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<com.haulmont.cuba.web.widgets.client.timefield.AmPm> event)
protected java.time.LocalTime constructModelValue(java.time.LocalTime value)
protected void setValueToPresentation(CubaTimeFieldWrapper.AmPmLocalTime value)
protected java.time.LocalTime convertToModel(CubaTimeFieldWrapper.AmPmLocalTime presentationValue)
protected CubaTimeFieldWrapper.AmPmLocalTime convertToPresentation(java.time.LocalTime modelValue)
protected static java.time.LocalTime convertFrom12hFormat(CubaTimeFieldWrapper.AmPmLocalTime amPmTime)
protected static CubaTimeFieldWrapper.AmPmLocalTime convertTo12hFormat(java.time.LocalTime time)