com.vaadin.client.ui.
Class VDateFieldCalendar
- 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.VAbstractDateFieldCalendar<VDateCalendarPanel,DateResolution>
-
- com.vaadin.client.ui.VDateFieldCalendar
-
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,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
,Field
,Iterable<com.google.gwt.user.client.ui.Widget>
public class VDateFieldCalendar extends VAbstractDateFieldCalendar<VDateCalendarPanel,DateResolution>
A client side implementation for InlineDateField.
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.VAbstractDateFieldCalendar
calendarPanel
-
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 VDateFieldCalendar()
Constructs a widget for the InlineDateField component.
-
Method Summary
All Methods Modifier and Type Method Description protected DateResolution[]
doGetResolutions()
Returns all available resolutions as an array.
protected Date
getDate(Map<DateResolution,Integer> dateVaules)
Returns a date based on the provided date values map.
boolean
isYear(DateResolution resolution)
Checks whether the given
resolution
represents an year.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.
void
updateBufferedValues()
Update buffered values
VDateField.bufferedDateString
andVDateField.bufferedResolutions
that will be sent to the server.void
updateValueFromPanel()
TODO refactor: almost same method as in VPopupCalendar.updateValue
-
Methods inherited from class com.vaadin.client.ui.VAbstractDateFieldCalendar
getTabIndex, setTabIndex
-
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, setEnabled, 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, onAttach, onBrowserEvent, onDetach, 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, setStyleName, setStylePrimaryName, 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
-
-
-
-
Method Detail
-
updateBufferedValues
public void updateBufferedValues()
Description copied from class:
VDateField
Update buffered values
VDateField.bufferedDateString
andVDateField.bufferedResolutions
that will be sent to the server.This method should NOT send values to the server.
This method can be implemented by subclasses to update buffered values from component values.
Specified by:
updateBufferedValues
in classVDateField<DateResolution>
-
updateValueFromPanel
public void updateValueFromPanel()
TODO refactor: almost same method as in VPopupCalendar.updateValue
For internal use only. May be removed or replaced in the future.
Specified by:
updateValueFromPanel
in classVAbstractDateFieldCalendar<VDateCalendarPanel,DateResolution>
-
setCurrentResolution
public void setCurrentResolution(DateResolution resolution)
Description copied from class:
VDateField
Sets the resolution.
Overrides:
setCurrentResolution
in classVDateField<DateResolution>
Parameters:
resolution
- the new resolution
-
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
-
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
-
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:
-
getDate
protected Date getDate(Map<DateResolution,Integer> dateVaules)
Description copied from class:
VDateField
Returns a date based on the provided date values map.
Specified by:
getDate
in classVDateField<DateResolution>
Parameters:
dateVaules
- a map with date values to convert into a dateReturns:
the date based on the dateValues map
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
-
-