PANEL - the calendar panel type this field usesR - the resolution type which this field is based on (day, month, ...)public abstract class VAbstractPopupCalendar<PANEL extends VAbstractCalendarPanel<R>,R extends Enum<R>> extends VAbstractTextualDate<R> implements com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
com.vaadin.client.ui.VAbstractCalendarPanel and
then pass set it by calling the
setCalendarPanel(VAbstractCalendarPanel panel) method.com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
PANEL |
calendar
For internal use only.
|
com.google.gwt.user.client.ui.Button |
calendarToggle
For internal use only.
|
boolean |
parsable
For internal use only.
|
VOverlay |
popup
For internal use only.
|
lenient, textbufferedDateString, bufferedResolutions, CLASSNAME, client, connector, currentLocale, dts, enabled, readonly, rpc, showISOWeekNumbers| Constructor and Description |
|---|
VAbstractPopupCalendar(PANEL calendarPanel,
R resolution)
Constructs a date selection widget with a text field and a pop-up
date/time selector.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindAriaCaption(com.google.gwt.user.client.Element captionElement)
Called to bind the provided caption (label in HTML speak) element to the
main input element of the Widget.
|
void |
buildDate()
For internal use only.
|
protected void |
buildDate(boolean forceValid)
Update the text field contents from the date.
|
void |
closeCalendarPanel()
Closes the open popup panel.
|
String |
getDescriptionForAssistiveDevices()
Get the description that explains the usage of the Widget for users of
assistive devices.
|
protected int |
getOpenCalenderPanelKey()
Get the key code that opens the calendar panel.
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in
subPart. |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.
|
protected boolean |
hasChildFocus()
Returns whether any of the child components has focus.
|
boolean |
isTextFieldEnabled()
Checks whether the text field is enabled.
|
protected void |
onAttach() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
onClick(com.google.gwt.event.dom.client.ClickEvent event) |
void |
onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event) |
protected void |
onDetach() |
void |
openCalendarPanel()
Opens the calendar panel popup.
|
void |
setDescriptionForAssistiveDevices(String descriptionForAssistiveDevices)
Set a description that explains the usage of the Widget for users of
assistive devices.
|
void |
setEnabled(boolean enabled) |
void |
setFocus(boolean focus)
Sets focus to Calendar panel.
|
void |
setFocusedDate(Date selectedDate)
Sets the content of a special field for assistive devices, so that they
can recognize the change and inform the user (reading out in case of
screen reader).
|
void |
setRangeEnd(String rangeEnd)
Sets the end range for this component.
|
void |
setRangeStart(String rangeStart)
Sets the start range for this component.
|
void |
setStyleName(String style) |
void |
setStylePrimaryName(String style) |
void |
setTextFieldEnabled(boolean textFieldEnabled)
Sets the state of the text field of this component.
|
void |
setTextFieldTabIndex()
Set correct tab index for disabled text field in IE as the value set in
setTextFieldEnabled(...) gets overridden in
TextualDateConnection.updateFromUIDL(...).
|
protected void |
updateStyleNames()
Updates style names for the widget (and its children).
|
protected void |
updateTextFieldEnabled()
Updates the text field's enabled status to correspond with the latest
value set through
setTextFieldEnabled(boolean) and this
component's general setEnabled(boolean). |
void |
updateValue(Date newDate)
Changes the current date, and updates the
VDateField.bufferedResolutions, possibly
VDateField.sendBufferedValues() to the server if needed. |
checkGroupFocus, cleanFormat, createFormatString, focus, getFormatString, getISODate, getPlaceHolder, getText, onChange, onKeyDown, setAriaInvalid, setAriaRequired, setFormatString, setISODate, setPlaceholder, setText, setTimeZone, updateAndSendBufferedValues, updateBufferedResolutions, updateBufferedValuesdoGetResolutions, getClient, getCurrentDate, getCurrentLocale, getCurrentResolution, getDate, getDate, getDateTimeService, getDefaultDate, getId, getResolutions, getResolutionVariable, isEnabled, isReadonly, isShowISOWeekNumbers, isYear, resolutionAsString, sendBufferedValues, sendBufferedValuesWithDelay, setCurrentDate, setCurrentDate, setCurrentLocale, setCurrentResolution, setDate, setDefaultDate, setDefaultDate, setReadonly, setShowISOWeekNumbers, supportsTimeadd, 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 final com.google.gwt.user.client.ui.Button calendarToggle
public PANEL extends VAbstractCalendarPanel<R> calendar
public final VOverlay popup
public boolean parsable
public VAbstractPopupCalendar(PANEL calendarPanel, R resolution)
calendarPanel - the calendar panel instance that should be displayed in the
pop-upresolution - the resolution this widget should display (day, month, ...)protected void onAttach()
onAttach in class com.google.gwt.user.client.ui.Widgetprotected void onDetach()
onDetach in class com.google.gwt.user.client.ui.Widgetpublic void updateValue(Date newDate)
VDateField.bufferedResolutions, possibly
VDateField.sendBufferedValues() to the server if needed.newDate - the new Date to updatepublic boolean isTextFieldEnabled()
setTextFieldEnabled(boolean)public void setTextFieldEnabled(boolean textFieldEnabled)
If the text field is enabled, it represents this widget within the browser's tabulator focus cycle. When the text field is disabled, that role is instead given to the date selection button. If the entire component is disabled, the focus cycle skips this widget altogether.
textFieldEnabled - true if the text field should be enabled,
false if disabledprotected void updateTextFieldEnabled()
setTextFieldEnabled(boolean) and this
component's general setEnabled(boolean).setTextFieldEnabled(boolean)public void setTextFieldTabIndex()
public void bindAriaCaption(com.google.gwt.user.client.Element captionElement)
HandlesAriaCaptionbindAriaCaption in interface HandlesAriaCaptionbindAriaCaption in class VAbstractTextualDate<R extends Enum<R>>captionElement - Element of the captionpublic void setStyleName(String style)
setStyleName in class com.google.gwt.user.client.ui.UIObjectpublic void setStylePrimaryName(String style)
setStylePrimaryName in class com.google.gwt.user.client.ui.UIObjectprotected void updateStyleNames()
VAbstractTextualDateupdateStyleNames in class VAbstractTextualDate<R extends Enum<R>>public void openCalendarPanel()
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
onClick in interface com.google.gwt.event.dom.client.ClickHandlerpublic void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
onClose in interface com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>public void setFocus(boolean focus)
focus - true for focus, false for blurpublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledsetEnabled in class VAbstractTextualDate<R extends Enum<R>>public void setFocusedDate(Date selectedDate)
selectedDate - Date that is currently selectedpublic void buildDate()
buildDate in class VAbstractTextualDate<R extends Enum<R>>VAbstractTextualDate.buildDate()protected void buildDate(boolean forceValid)
buildDate().forceValid - true to force the text field to be updated, false to only
update if the parsable flag is true.public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetprotected int getOpenCalenderPanelKey()
public void closeCalendarPanel()
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement in interface SubPartAwaregetSubPartElement in class VAbstractTextualDate<R extends Enum<R>>subPart - The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement because interactions with the DIV and the
root button element produce the same result.
getSubPartName in interface SubPartAwaregetSubPartName in class VAbstractTextualDate<R extends Enum<R>>subElement - The element the identifier string should uniquely identifysubElement or null
if no identifier could be provided.public void setDescriptionForAssistiveDevices(String descriptionForAssistiveDevices)
descriptionForAssistiveDevices - String with the descriptionpublic String getDescriptionForAssistiveDevices()
public void setRangeStart(String rangeStart)
rangeStart - - the allowed range's start datepublic void setRangeEnd(String rangeEnd)
rangeEnd - - the allowed range's end dateprotected boolean hasChildFocus()
VAbstractTextualDatehasChildFocus in class VAbstractTextualDate<R extends Enum<R>>true if any of the child component has focus,
false otherwiseCopyright © 2021 Vaadin Ltd. All rights reserved.