public class VPopupTimeCalendar extends VAbstractPopupCalendar<VDateTimeCalendarPanel,DateTimeResolution>
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledcalendar, calendarToggle, parsable, popuplenient, textbufferedDateString, bufferedResolutions, CLASSNAME, client, connector, currentLocale, dts, enabled, readonly, rpc, showISOWeekNumbers| Constructor and Description |
|---|
VPopupTimeCalendar()
Constructs a date-time selection component with a text field and a pop-up
date-and-time selector.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
cleanFormat(String format)
Clean date format string to make it suitable for
VAbstractTextualDate.getFormatString(). |
protected String |
createFormatString()
Create a format string suitable for the widget in its current state.
|
protected DateTimeResolution[] |
doGetResolutions()
Returns all available resolutions as an array.
|
protected Date |
getDate(Map<DateTimeResolution,Integer> dateValues)
Returns a date based on the provided date values map.
|
boolean |
isYear(DateTimeResolution resolution)
Checks whether the given
resolution represents an year. |
static Date |
makeDate(Map<DateTimeResolution,Integer> dateValues)
Creates a date based on the provided date values map.
|
String |
resolutionAsString()
Returns a current resolution as a string.
|
void |
setCurrentResolution(DateTimeResolution resolution)
Sets the resolution.
|
protected boolean |
supportsTime()
Checks whether time is supported by this widget.
|
protected void |
updateBufferedResolutions()
Updates
bufferedResolutions before
sending a response to the server. |
void |
updateValue(Date newDate)
Changes the current date, and updates the
VDateField.bufferedResolutions, possibly
VDateField.sendBufferedValues() to the server if needed. |
bindAriaCaption, buildDate, buildDate, closeCalendarPanel, getDescriptionForAssistiveDevices, getOpenCalenderPanelKey, getSubPartElement, getSubPartName, hasChildFocus, isTextFieldEnabled, onAttach, onBrowserEvent, onClick, onClose, onDetach, openCalendarPanel, setDescriptionForAssistiveDevices, setEnabled, setFocus, setFocusedDate, setRangeEnd, setRangeStart, setStyleName, setStylePrimaryName, setTextFieldEnabled, setTextFieldTabIndex, updateStyleNames, updateTextFieldEnabledcheckGroupFocus, focus, getFormatString, getISODate, getPlaceHolder, getText, onChange, onKeyDown, setAriaInvalid, setAriaRequired, setFormatString, setISODate, setPlaceholder, setText, setTimeZone, updateAndSendBufferedValues, updateBufferedValuesgetClient, getCurrentDate, getCurrentLocale, getCurrentResolution, getDate, getDateTimeService, getDefaultDate, getId, getResolutions, getResolutionVariable, isEnabled, isReadonly, isShowISOWeekNumbers, sendBufferedValues, sendBufferedValuesWithDelay, setCurrentDate, setCurrentDate, setCurrentLocale, setDate, setDefaultDate, setDefaultDate, setReadonly, setShowISOWeekNumbersadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, adopt, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetWidgetIndexgetWidget, getWidgetCount, getWidgetIndex, removeforEach, spliteratorpublic VPopupTimeCalendar()
VDateTimeCalendarPanel as the
pop-up content. Default resolution is DateTimeResolution.MINUTE.protected DateTimeResolution[] doGetResolutions()
VDateField
No any order is required (in contrary to VDateField.getResolutions().
doGetResolutions in class VDateField<DateTimeResolution>VDateField.getResolutions()public String resolutionAsString()
VDateFieldThe method is used to generate a style name for the current resolution.
resolutionAsString in class VDateField<DateTimeResolution>public void setCurrentResolution(DateTimeResolution resolution)
VDateFieldsetCurrentResolution in class VDateField<DateTimeResolution>resolution - the new resolutionpublic static Date makeDate(Map<DateTimeResolution,Integer> dateValues)
dateValues - a map with date values to convert into a datepublic boolean isYear(DateTimeResolution resolution)
VDateFieldresolution represents an year.isYear in class VDateField<DateTimeResolution>resolution - the given resolutiontrue if the resolution represents an yearprotected Date getDate(Map<DateTimeResolution,Integer> dateValues)
VDateFieldgetDate in class VDateField<DateTimeResolution>dateValues - a map with date values to convert into a dateVDateField.setCurrentDate(Map)protected void updateBufferedResolutions()
VAbstractTextualDatebufferedResolutions before
sending a response to the server.
The method can be overridden by subclasses to provide a custom logic for
date variables to avoid overriding the VAbstractTextualDate.onChange(ChangeEvent)
method.
Note that this method should not send the buffered values. For that, use
VDateField.sendBufferedValues().
updateBufferedResolutions in class VAbstractTextualDate<DateTimeResolution>public void updateValue(Date newDate)
VAbstractPopupCalendarVDateField.bufferedResolutions, possibly
VDateField.sendBufferedValues() to the server if needed.updateValue in class VAbstractPopupCalendar<VDateTimeCalendarPanel,DateTimeResolution>newDate - the new Date to updateprotected String createFormatString()
VAbstractTextualDatecreateFormatString in class VAbstractTextualDate<DateTimeResolution>protected String cleanFormat(String format)
VAbstractTextualDateVAbstractTextualDate.getFormatString().cleanFormat in class VAbstractTextualDate<DateTimeResolution>format - date format stringVAbstractTextualDate.getFormatString()protected boolean supportsTime()
VDateFieldsupportsTime in class VDateField<DateTimeResolution>true if time is supported in addition to date,
false if only dates are supportedCopyright © 2023 Vaadin Ltd. All rights reserved.