public abstract class AbstractLocalDateTimeField extends AbstractDateField<LocalDateTime,DateTimeResolution>
LocalDateTime type.HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<V>Component.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
AbstractLocalDateTimeField()
Constructs an empty
AbstractLocalDateTimeField with no
caption. |
AbstractLocalDateTimeField(String caption)
Constructs an empty
AbstractLocalDateTimeField with caption. |
AbstractLocalDateTimeField(String caption,
LocalDateTime value)
Constructs a new
AbstractLocalDateTimeField with the given
caption and initial text contents. |
| Modifier and Type | Method and Description |
|---|---|
protected LocalDateTime |
buildDate(Map<DateTimeResolution,Integer> resolutionValues)
Builds date by the given
resolutionValues which is a map whose
keys are resolution and integer values. |
protected LocalDateTime |
convertFromDate(Date date)
Converts
Date to date type T. |
protected Date |
convertToDate(LocalDateTime date)
Converts the object of type
T to Date. |
protected String |
formatDate(LocalDateTime value)
Formats date according to the components locale.
|
protected int |
getDatePart(LocalDateTime date,
DateTimeResolution resolution)
Returns a date integer value part for the given
date for the
given resolution. |
protected RangeValidator<LocalDateTime> |
getRangeValidator()
Returns a custom date range validator which is applicable for the type
T. |
protected AbstractTextualDateFieldState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected AbstractTextualDateFieldState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
protected LocalDateTime |
toType(TemporalAccessor temporalAccessor)
Converts a temporal value into field-specific data type.
|
addBlurListener, addFocusListener, afterDate, beforeClientResponse, convertFromDateString, convertToDateString, doSetValue, getAssistiveLabel, getDateFormat, getDateOutOfRangeMessage, getDateStyle, getDateStyles, getDefaultValidator, getDefaultValue, getParseErrorMessage, getRangeEnd, getRangeStart, getResolution, getValue, getZoneId, handleUnparsableDateString, isLenient, isShowISOWeekNumbers, readDesign, reconstructDateFromFields, setAssistiveLabel, setDateFormat, setDateOutOfRangeMessage, setDateStyle, setDefaultValue, setLenient, setLocale, setParseErrorMessage, setRangeEnd, setRangeStart, setResolution, setShowISOWeekNumbers, setValue, setZoneId, writeDesignaddValueChangeListener, createValueChange, focus, getCustomAttributes, getTabIndex, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setTabIndex, setValueaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitclear, getEmptyValue, getOptionalValue, isEmptyaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefinedpublic AbstractLocalDateTimeField()
AbstractLocalDateTimeField with no
caption.public AbstractLocalDateTimeField(String caption)
AbstractLocalDateTimeField with caption.caption - the caption of the datefield.public AbstractLocalDateTimeField(String caption, LocalDateTime value)
AbstractLocalDateTimeField with the given
caption and initial text contents.caption - the caption String for the editor.value - the LocalDateTime value.protected AbstractTextualDateFieldState getState()
AbstractComponentgetState in class AbstractDateField<LocalDateTime,DateTimeResolution>protected AbstractTextualDateFieldState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractDateField<LocalDateTime,DateTimeResolution>markAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()protected int getDatePart(LocalDateTime date, DateTimeResolution resolution)
AbstractDateFielddate for the
given resolution.getDatePart in class AbstractDateField<LocalDateTime,DateTimeResolution>date - the given date, can be nullresolution - the resolution to extract a value from the date by, not
nullprotected RangeValidator<LocalDateTime> getRangeValidator()
AbstractDateFieldT.getRangeValidator in class AbstractDateField<LocalDateTime,DateTimeResolution>protected LocalDateTime buildDate(Map<DateTimeResolution,Integer> resolutionValues)
AbstractDateFieldresolutionValues which is a map whose
keys are resolution and integer values.
This is the opposite to AbstractDateField.getDatePart(Temporal, Enum).
buildDate in class AbstractDateField<LocalDateTime,DateTimeResolution>resolutionValues - date values to construct a dateprotected LocalDateTime convertFromDate(Date date)
AbstractDateFieldDate to date type T.convertFromDate in class AbstractDateField<LocalDateTime,DateTimeResolution>date - a date to convertT representing the dateprotected Date convertToDate(LocalDateTime date)
AbstractDateFieldT to Date.
This is the opposite to AbstractDateField.convertFromDate(Date).
convertToDate in class AbstractDateField<LocalDateTime,DateTimeResolution>date - the date of type TDateprotected String formatDate(LocalDateTime value)
AbstractDateFieldformatDate in class AbstractDateField<LocalDateTime,DateTimeResolution>value - the date or nullnullprotected LocalDateTime toType(TemporalAccessor temporalAccessor)
AbstractDateFieldtoType in class AbstractDateField<LocalDateTime,DateTimeResolution>temporalAccessor - - source valueCopyright © 2020 Vaadin Ltd. All rights reserved.