Package com.vaadin.v7.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.v7.client.ui.VDateField
-
- com.vaadin.v7.client.ui.VTextualDate
-
- com.vaadin.v7.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 VTextualDate implements com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
Represents a date selection component with a text field and a popup date selector. Note: To change the keyboard assignments used in the popup dialog you should extendVCalendarPaneland then pass set it by calling thesetCalendarPanel(VCalendarPanel panel)method.
-
-
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 Modifier and Type Field Description VCalendarPanelcalendarFor internal use only.com.google.gwt.user.client.ui.ButtoncalendarToggleFor internal use only.booleanparsableFor internal use only.VOverlaypopupFor internal use only.-
Fields inherited from class com.vaadin.v7.client.ui.VTextualDate
ATTR_INPUTPROMPT, formatStr, inputPrompt, lenient, text
-
Fields inherited from class com.vaadin.v7.client.ui.VDateField
CLASSNAME, client, currentLocale, currentResolution, dts, enabled, immediate, paintableId, readonly, RESOLUTION_DAY, RESOLUTION_HOUR, RESOLUTION_MIN, RESOLUTION_MONTH, RESOLUTION_SEC, RESOLUTION_YEAR, showISOWeekNumbers
-
-
Constructor Summary
Constructors Constructor Description VPopupCalendar()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindAriaCaption(com.google.gwt.user.client.Element captionElement)voidbuildDate()For internal use only.protected voidbuildDate(boolean forceValid)Update the text field contents from the date.voidcloseCalendarPanel()Closes the open popup panel.StringgetDescriptionForAssistiveDevices()Get the description that explains the usage of the Widget for users of assistive devices.protected intgetOpenCalenderPanelKey()Get the key code that opens the calendar panel.com.google.gwt.user.client.ElementgetSubPartElement(String subPart)StringgetSubPartName(com.google.gwt.user.client.Element subElement)booleanisTextFieldEnabled()Checks whether the text field is enabled.protected voidonAttach()voidonBrowserEvent(com.google.gwt.user.client.Event event)voidonClick(com.google.gwt.event.dom.client.ClickEvent event)voidonClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)protected voidonDetach()voidopenCalendarPanel()Opens the calendar panel popup.voidsetDescriptionForAssistiveDevices(String descriptionForAssistiveDevices)Set a description that explains the usage of the Widget for users of assistive devices.voidsetEnabled(boolean enabled)voidsetFocus(boolean focus)Sets focus to Calendar panel.voidsetFocusedDate(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).voidsetRangeEnd(Date rangeEnd)Sets the end range for this component.voidsetRangeStart(Date rangeStart)Sets the start range for this component.voidsetStyleName(String style)voidsetStylePrimaryName(String style)voidsetTextFieldEnabled(boolean textFieldEnabled)Sets the state of the text field of this component.voidsetTextFieldTabIndex()Set correct tab index for disabled text field in IE as the value set in setTextFieldEnabled(...) gets overridden in TextualDateConnection.updateFromUIDL(...).protected voidupdateStyleNames()protected voidupdateTextFieldEnabled()voidupdateValue(Date newDate)-
Methods inherited from class com.vaadin.v7.client.ui.VTextualDate
focus, getFormatString, getText, onChange, onKeyDown, setAriaInvalid, setAriaRequired, setPrompting, setText
-
Methods inherited from class com.vaadin.v7.client.ui.VDateField
getClient, getCurrentDate, getCurrentLocale, getCurrentResolution, getDate, getDateTimeService, getId, getMilliseconds, getTime, isEnabled, isImmediate, isReadonly, isShowISOWeekNumbers, resolutionToString, setCurrentDate, setCurrentLocale, setCurrentResolution, setDate, setImmediate, setMilliseconds, 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
-
-
-
-
Field Detail
-
calendarToggle
public final com.google.gwt.user.client.ui.Button calendarToggle
For internal use only. May be removed or replaced in the future.
-
calendar
public VCalendarPanel calendar
For internal use only. May be removed or replaced in the future.
-
popup
public final VOverlay popup
For internal use only. May be removed or replaced in the future.
-
parsable
public boolean parsable
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
onAttach
protected void onAttach()
- Overrides:
onAttachin classcom.google.gwt.user.client.ui.Widget
-
onDetach
protected void onDetach()
- Overrides:
onDetachin classcom.google.gwt.user.client.ui.Widget
-
updateValue
public void updateValue(Date newDate)
-
isTextFieldEnabled
public boolean isTextFieldEnabled()
Checks whether the text field is enabled.- Returns:
- The current state of the text field.
- See Also:
setTextFieldEnabled(boolean)
-
setTextFieldEnabled
public void setTextFieldEnabled(boolean textFieldEnabled)
Sets the state of the text field of this component. By default the text field is enabled. Disabling it causes only the button for date selection to be active, thus preventing the user from entering invalid dates. See 6790.- Parameters:
textFieldEnabled-
-
updateTextFieldEnabled
protected void updateTextFieldEnabled()
-
setTextFieldTabIndex
public void setTextFieldTabIndex()
Set correct tab index for disabled text field in IE as the value set in setTextFieldEnabled(...) gets overridden in TextualDateConnection.updateFromUIDL(...).- Since:
- 7.3.1
-
bindAriaCaption
public void bindAriaCaption(com.google.gwt.user.client.Element captionElement)
- Specified by:
bindAriaCaptionin interfaceHandlesAriaCaption- Overrides:
bindAriaCaptionin classVTextualDate
-
setStyleName
public void setStyleName(String style)
- Overrides:
setStyleNamein classcom.google.gwt.user.client.ui.UIObject
-
setStylePrimaryName
public void setStylePrimaryName(String style)
- Overrides:
setStylePrimaryNamein classcom.google.gwt.user.client.ui.UIObject
-
updateStyleNames
protected void updateStyleNames()
- Overrides:
updateStyleNamesin classVTextualDate
-
openCalendarPanel
public void openCalendarPanel()
Opens the calendar panel popup.
-
onClick
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
- Specified by:
onClickin interfacecom.google.gwt.event.dom.client.ClickHandler
-
onClose
public void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
- Specified by:
onClosein interfacecom.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
-
setFocus
public void setFocus(boolean focus)
Sets focus to Calendar panel.- Parameters:
focus-
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled- Overrides:
setEnabledin classVTextualDate
-
setFocusedDate
public 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).- Parameters:
selectedDate- Date that is currently selected
-
buildDate
public void buildDate()
For internal use only. May be removed or replaced in the future.- Overrides:
buildDatein classVTextualDate- See Also:
VTextualDate.buildDate()
-
buildDate
protected void buildDate(boolean forceValid)
Update the text field contents from the date. SeebuildDate().- Parameters:
forceValid- true to force the text field to be updated, false to only update if the parsable flag is true.
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin classcom.google.gwt.user.client.ui.Widget
-
getOpenCalenderPanelKey
protected int getOpenCalenderPanelKey()
Get the key code that opens the calendar panel. By default it is the down key but you can override this to be whatever you like- Returns:
-
closeCalendarPanel
public void closeCalendarPanel()
Closes the open popup panel.
-
getSubPartElement
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
- Specified by:
getSubPartElementin interfaceSubPartAware- Overrides:
getSubPartElementin classVTextualDate
-
getSubPartName
public String getSubPartName(com.google.gwt.user.client.Element subElement)
- Specified by:
getSubPartNamein interfaceSubPartAware- Overrides:
getSubPartNamein classVTextualDate
-
setDescriptionForAssistiveDevices
public void setDescriptionForAssistiveDevices(String descriptionForAssistiveDevices)
Set a description that explains the usage of the Widget for users of assistive devices.- Parameters:
descriptionForAssistiveDevices- String with the description
-
getDescriptionForAssistiveDevices
public String getDescriptionForAssistiveDevices()
Get the description that explains the usage of the Widget for users of assistive devices.- Returns:
- String with the description
-
setRangeStart
public void setRangeStart(Date rangeStart)
Sets the start range for this component. The start range is inclusive, and it depends on the current resolution, what is considered inside the range.- Parameters:
rangeStart- - the allowed range's start date
-
setRangeEnd
public void setRangeEnd(Date rangeEnd)
Sets the end range for this component. The end range is inclusive, and it depends on the current resolution, what is considered inside the range.- Parameters:
rangeEnd- - the allowed range's end date
-
-