com.vaadin.client.ui.
Class VPopupCalendar
- 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<VDateCalendarPanel,DateResolution>
-
- com.vaadin.client.ui.VPopupCalendar
-
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 VPopupCalendar extends VAbstractPopupCalendar<VDateCalendarPanel,DateResolution>
Represents a date selection component with a text field and a popup date selector.
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 VPopupCalendar()
Constructs a date selection component with a text field and a pop-up date 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 DateResolution[]
doGetResolutions()
Returns all available resolutions as an array.
protected Date
getDate(Map<DateResolution,Integer> dateValues)
Returns a date based on the provided date values map.
boolean
isYear(DateResolution resolution)
Checks whether the given
resolution
represents an year.static Date
makeDate(Map<DateResolution,Integer> dateValues)
Creates a date based on the provided date values map.
String
resolutionAsString()
Returns a current resolution as a string.
void
setCurrentResolution(DateResolution 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.-
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, updateValue
-
Methods inherited from class com.vaadin.client.ui.VAbstractTextualDate
checkGroupFocus, createFormatString, 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
-
VPopupCalendar
public VPopupCalendar()
Constructs a date selection component with a text field and a pop-up date selector. Uses a
VDateCalendarPanel
as the pop-up content. Default resolution isDateTimeResolution.YEAR
.
-
-
Method Detail
-
doGetResolutions
protected DateResolution[] 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<DateResolution>
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<DateResolution>
Returns:
the current resolution as a string
-
setCurrentResolution
public void setCurrentResolution(DateResolution resolution)
Description copied from class:
VDateField
Sets the resolution.
Overrides:
setCurrentResolution
in classVDateField<DateResolution>
Parameters:
resolution
- the new resolution
-
makeDate
public static Date makeDate(Map<DateResolution,Integer> dateValues)
Creates a date based on the provided date values map. Any values of a more precise resolution than day are ignored.
Parameters:
dateValues
- a map with date values to convert into a dateReturns:
the date based on the dateValues map
-
isYear
public boolean isYear(DateResolution resolution)
Description copied from class:
VDateField
Checks whether the given
resolution
represents an year.Specified by:
isYear
in classVDateField<DateResolution>
Parameters:
resolution
- the given resolutionReturns:
true
if theresolution
represents an year
-
getDate
protected Date getDate(Map<DateResolution,Integer> dateValues)
Description copied from class:
VDateField
Returns a date based on the provided date values map.
Specified by:
getDate
in classVDateField<DateResolution>
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<DateResolution>
-
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<DateResolution>
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<DateResolution>
Returns:
true
if time is supported in addition to date,false
if only dates are supported
-
-