public class DateTimeField extends AbstractLocalDateTimeField
AbstractLocalDateTimeField,
InlineDateTimeField,
Serialized FormHasValue.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 |
|---|
DateTimeField()
Constructs an empty
DateTimeField with no caption. |
DateTimeField(HasValue.ValueChangeListener<LocalDateTime> valueChangeListener)
Constructs a new
DateTimeField with a value change listener. |
DateTimeField(String caption)
Constructs an empty
DateTimeField with caption. |
DateTimeField(String caption,
HasValue.ValueChangeListener<LocalDateTime> valueChangeListener)
Constructs a new
DateTimeField with the given caption and a value
change listener. |
DateTimeField(String caption,
LocalDateTime value)
Constructs a new
DateTimeField with the given caption and
initial text contents. |
DateTimeField(String caption,
LocalDateTime value,
HasValue.ValueChangeListener<LocalDateTime> valueChangeListener)
Constructs a new
DateTimeField with the given caption, initial
text contents and a value change listener. |
| Modifier and Type | Method and Description |
|---|---|
String |
getAssistiveText()
Get the description that explains the usage of the Widget for users of
assistive devices.
|
String |
getPlaceholder()
Returns the current placeholder text.
|
protected LocalDateTimeFieldState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected LocalDateTimeFieldState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
boolean |
isTextFieldEnabled()
Checks whether the text field is enabled (default) or not.
|
void |
setAssistiveText(String description)
Set a description that explains the usage of the Widget for users of
assistive devices.
|
void |
setPlaceholder(String placeholder)
Sets the placeholder text.
|
void |
setTextFieldEnabled(boolean state)
Enables or disables the text field.
|
buildDate, convertFromDate, convertToDate, formatDate, getDatePart, getRangeValidator, toTypeaddBlurListener, 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, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, 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, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedpublic DateTimeField()
DateTimeField with no caption.public DateTimeField(String caption, LocalDateTime value)
DateTimeField with the given caption and
initial text contents.caption - the caption String for the editor.value - the LocalDateTime value.public DateTimeField(String caption)
DateTimeField with caption.caption - the caption of the datefield.public DateTimeField(HasValue.ValueChangeListener<LocalDateTime> valueChangeListener)
DateTimeField with a value change listener.
The listener is called when the value of this DateTimeField is
changed either by the user or programmatically.
valueChangeListener - the value change listener, not nullpublic DateTimeField(String caption, HasValue.ValueChangeListener<LocalDateTime> valueChangeListener)
DateTimeField with the given caption and a value
change listener.
The listener is called when the value of this DateTimeField is
changed either by the user or programmatically.
caption - the caption for the fieldvalueChangeListener - the value change listener, not nullpublic DateTimeField(String caption, LocalDateTime value, HasValue.ValueChangeListener<LocalDateTime> valueChangeListener)
DateTimeField with the given caption, initial
text contents and a value change listener.
The listener is called when the value of this DateTimeField is
changed either by the user or programmatically.
caption - the caption for the fieldvalue - the value for the field, not nullvalueChangeListener - the value change listener, not nullpublic String getPlaceholder()
setPlaceholder(String)public void setPlaceholder(String placeholder)
placeholder - the placeholder text to setprotected LocalDateTimeFieldState getState()
AbstractComponentgetState in class AbstractLocalDateTimeFieldprotected LocalDateTimeFieldState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractLocalDateTimeFieldmarkAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()public boolean isTextFieldEnabled()
setTextFieldEnabled(boolean)public void setTextFieldEnabled(boolean state)
state - true to enable text field, false to disable it.public void setAssistiveText(String description)
description - String with the descriptionpublic String getAssistiveText()
Copyright © 2018 Vaadin Ltd. All rights reserved.