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, text
bufferedDateString, bufferedResolutions, CLASSNAME, client, connector, currentLocale, dts, enabled, readonly, rpc, showISOWeekNumbers
Constructor and Description |
---|
VAbstractPopupCalendar(PANEL calendarPanel,
R resolution) |
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() |
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, updateBufferedValues
doGetResolutions, getClient, getCurrentDate, getCurrentLocale, getCurrentResolution, getDate, getDate, getDateTimeService, getDefaultDate, getId, getResolutions, getResolutionVariable, isEnabled, isReadonly, isShowISOWeekNumbers, isYear, resolutionAsString, sendBufferedValues, setCurrentDate, setCurrentDate, setCurrentLocale, setCurrentResolution, setDate, setDefaultDate, setDefaultDate, setReadonly, setShowISOWeekNumbers, supportsTime
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getWidgetIndex
getWidget, getWidgetCount, getWidgetIndex, remove
forEach, spliterator
public final com.google.gwt.user.client.ui.Button calendarToggle
public PANEL extends VAbstractCalendarPanel<R> calendar
public final VOverlay popup
public boolean parsable
protected void onAttach()
onAttach
in class com.google.gwt.user.client.ui.Widget
protected void onDetach()
onDetach
in class com.google.gwt.user.client.ui.Widget
public void updateValue(Date newDate)
VDateField.bufferedResolutions
, possibly
VDateField.sendBufferedValues()
to the server if needednewDate
- the new Date
to updatepublic boolean isTextFieldEnabled()
setTextFieldEnabled(boolean)
public void setTextFieldEnabled(boolean textFieldEnabled)
textFieldEnabled
- protected void updateTextFieldEnabled()
public void setTextFieldTabIndex()
public void bindAriaCaption(com.google.gwt.user.client.Element captionElement)
HandlesAriaCaption
bindAriaCaption
in interface HandlesAriaCaption
bindAriaCaption
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.UIObject
public void setStylePrimaryName(String style)
setStylePrimaryName
in class com.google.gwt.user.client.ui.UIObject
protected void updateStyleNames()
VAbstractTextualDate
updateStyleNames
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.ClickHandler
public 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 blur
public void setEnabled(boolean enabled)
setEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
setEnabled
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.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
protected int getOpenCalenderPanelKey()
public void closeCalendarPanel()
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAware
subPart
. The subPart
identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement
in interface SubPartAware
getSubPartElement
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)
SubPartAware
subElement
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 SubPartAware
getSubPartName
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()
VAbstractTextualDate
hasChildFocus
in class VAbstractTextualDate<R extends Enum<R>>
true
if any of the child component has focus,
false
otherwiseCopyright © 2018 Vaadin Ltd. All rights reserved.