com.vaadin.client.ui.
Class VPopupTimeCalendar
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.google.gwt.user.client.ui.FlowPanel
-
- com.vaadin.client.ui.VDateField<R>
-
- com.vaadin.client.ui.VAbstractTextualDate<R>
-
- com.vaadin.client.ui.VAbstractPopupCalendar<VDateTimeCalendarPanel,DateTimeResolution>
-
- com.vaadin.client.ui.VPopupTimeCalendar
-
All Implemented Interfaces:
com.google.gwt.event.dom.client.ChangeHandler
,com.google.gwt.event.dom.client.ClickHandler
,com.google.gwt.event.dom.client.KeyDownHandler
,com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.EventHandler
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasEnabled
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.InsertPanel
,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,Focusable
,HandlesAriaCaption
,HandlesAriaInvalid
,HandlesAriaRequired
,Field
,SubPartAware
,Iterable<com.google.gwt.user.client.ui.Widget>
public class VPopupTimeCalendar extends VAbstractPopupCalendar<VDateTimeCalendarPanel,DateTimeResolution>
Represents a date-time selection component with a text field and a pop-up date-and-time selector.
Since:
8.0
Author:
Vaadin Ltd
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
-
Field Summary
-
Fields inherited from class com.vaadin.client.ui.VAbstractPopupCalendar
calendar, calendarToggle, parsable, popup
-
Fields inherited from class com.vaadin.client.ui.VAbstractTextualDate
lenient, text
-
Fields inherited from class com.vaadin.client.ui.VDateField
bufferedDateString, bufferedResolutions, CLASSNAME, client, connector, currentLocale, dts, enabled, readonly, rpc, showISOWeekNumbers
-
-
Constructor Summary
Constructors Constructor Description VPopupTimeCalendar()
Constructs a date-time selection component with a text field and a pop-up date-and-time selector.
-
Method Summary
All Methods Modifier and Type Method 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
, possiblyVDateField.sendBufferedValues()
to the server if needed.-
Methods inherited from class com.vaadin.client.ui.VAbstractPopupCalendar
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, updateTextFieldEnabled
-
Methods inherited from class com.vaadin.client.ui.VAbstractTextualDate
checkGroupFocus, focus, getFormatString, getISODate, getPlaceHolder, getText, onChange, onKeyDown, setAriaInvalid, setAriaRequired, setFormatString, setISODate, setPlaceholder, setText, setTimeZone, updateAndSendBufferedValues, updateBufferedValues
-
Methods inherited from class com.vaadin.client.ui.VDateField
getClient, getCurrentDate, getCurrentLocale, getCurrentResolution, getDate, getDateTimeService, getDefaultDate, getId, getResolutions, getResolutionVariable, isEnabled, isReadonly, isShowISOWeekNumbers, sendBufferedValues, sendBufferedValuesWithDelay, setCurrentDate, setCurrentDate, setCurrentLocale, setDate, setDefaultDate, setDefaultDate, setReadonly, setShowISOWeekNumbers
-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, 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, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
VPopupTimeCalendar
public VPopupTimeCalendar()
Constructs a date-time selection component with a text field and a pop-up date-and-time selector. Uses a
VDateTimeCalendarPanel
as the pop-up content. Default resolution isDateTimeResolution.MINUTE
.
-
-
Method Detail
-
doGetResolutions
protected DateTimeResolution[] doGetResolutions()
Description copied from class:
VDateField
Returns all available resolutions as an array.
No any order is required (in contrary to
VDateField.getResolutions()
.Specified by:
doGetResolutions
in classVDateField<DateTimeResolution>
Returns:
all available resolutions
See Also:
-
resolutionAsString
public String resolutionAsString()
Description copied from class:
VDateField
Returns a current resolution as a string.
The method is used to generate a style name for the current resolution.
Specified by:
resolutionAsString
in classVDateField<DateTimeResolution>
Returns:
the current resolution as a string
-
setCurrentResolution
public void setCurrentResolution(DateTimeResolution resolution)
Description copied from class:
VDateField
Sets the resolution.
Overrides:
setCurrentResolution
in classVDateField<DateTimeResolution>
Parameters:
resolution
- the new resolution
-
makeDate
public static Date makeDate(Map<DateTimeResolution,Integer> dateValues)
Creates a date based on the provided date values map.
Parameters:
dateValues
- a map with date values to convert into a dateReturns:
the date based on the dateValues map
-
isYear
public boolean isYear(DateTimeResolution resolution)
Description copied from class:
VDateField
Checks whether the given
resolution
represents an year.Specified by:
isYear
in classVDateField<DateTimeResolution>
Parameters:
resolution
- the given resolutionReturns:
true
if theresolution
represents an year
-
getDate
protected Date getDate(Map<DateTimeResolution,Integer> dateValues)
Description copied from class:
VDateField
Returns a date based on the provided date values map.
Specified by:
getDate
in classVDateField<DateTimeResolution>
Parameters:
dateValues
- a map with date values to convert into a dateReturns:
the date based on the dateValues map
See Also:
-
updateBufferedResolutions
protected void updateBufferedResolutions()
Description copied from class:
VAbstractTextualDate
Updates
bufferedResolutions
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()
.Overrides:
updateBufferedResolutions
in classVAbstractTextualDate<DateTimeResolution>
-
updateValue
public void updateValue(Date newDate)
Description copied from class:
VAbstractPopupCalendar
Changes the current date, and updates the
VDateField.bufferedResolutions
, possiblyVDateField.sendBufferedValues()
to the server if needed.Overrides:
updateValue
in classVAbstractPopupCalendar<VDateTimeCalendarPanel,DateTimeResolution>
Parameters:
newDate
- the newDate
to update
-
createFormatString
protected String createFormatString()
Description copied from class:
VAbstractTextualDate
Create a format string suitable for the widget in its current state.
Overrides:
createFormatString
in classVAbstractTextualDate<DateTimeResolution>
Returns:
a date format string to use when formatting and parsing the text in the input field
-
cleanFormat
protected String cleanFormat(String format)
Description copied from class:
VAbstractTextualDate
Clean date format string to make it suitable for
VAbstractTextualDate.getFormatString()
.Overrides:
cleanFormat
in classVAbstractTextualDate<DateTimeResolution>
Parameters:
format
- date format stringReturns:
cleaned up string
See Also:
-
supportsTime
protected boolean supportsTime()
Description copied from class:
VDateField
Checks whether time is supported by this widget.
Specified by:
supportsTime
in classVDateField<DateTimeResolution>
Returns:
true
if time is supported in addition to date,false
if only dates are supported
-
-