Package com.vaadin.client.ui
Class VDateTimeCalendarPanel
- 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.HTMLTable
-
- com.google.gwt.user.client.ui.FlexTable
-
- com.vaadin.client.ui.FocusableFlexTable
-
- com.vaadin.client.ui.VAbstractCalendarPanel<DateTimeResolution>
-
- com.vaadin.client.ui.VDateTimeCalendarPanel
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.BlurHandler,com.google.gwt.event.dom.client.FocusHandler,com.google.gwt.event.dom.client.HasAllDragAndDropHandlers,com.google.gwt.event.dom.client.HasBlurHandlers,com.google.gwt.event.dom.client.HasClickHandlers,com.google.gwt.event.dom.client.HasDoubleClickHandlers,com.google.gwt.event.dom.client.HasDragEndHandlers,com.google.gwt.event.dom.client.HasDragEnterHandlers,com.google.gwt.event.dom.client.HasDragHandlers,com.google.gwt.event.dom.client.HasDragLeaveHandlers,com.google.gwt.event.dom.client.HasDragOverHandlers,com.google.gwt.event.dom.client.HasDragStartHandlers,com.google.gwt.event.dom.client.HasDropHandlers,com.google.gwt.event.dom.client.HasFocusHandlers,com.google.gwt.event.dom.client.HasKeyDownHandlers,com.google.gwt.event.dom.client.HasKeyPressHandlers,com.google.gwt.event.dom.client.KeyDownHandler,com.google.gwt.event.dom.client.KeyPressHandler,com.google.gwt.event.dom.client.MouseDownHandler,com.google.gwt.event.dom.client.MouseOutHandler,com.google.gwt.event.dom.client.MouseUpHandler,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.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,com.google.gwt.user.client.ui.SourcesTableEvents,Focusable,SubPartAware,Iterable<com.google.gwt.user.client.ui.Widget>
public class VDateTimeCalendarPanel extends VAbstractCalendarPanel<DateTimeResolution>
A calendar panel widget to show and select a date and a time.- Since:
- 8.0
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceVDateTimeCalendarPanel.TimeChangeListenerDispatches an event when the panel when time is changed.classVDateTimeCalendarPanel.VTimeTimeSelector is a widget consisting of list boxes that modify the Date object that is given for.-
Nested classes/interfaces inherited from class com.vaadin.client.ui.VAbstractCalendarPanel
VAbstractCalendarPanel.FocusChangeListener, VAbstractCalendarPanel.FocusedDate, VAbstractCalendarPanel.FocusOutListener, VAbstractCalendarPanel.SubmitListener
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.FlexTable
com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable
com.google.gwt.user.client.ui.HTMLTable.Cell, com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter
-
-
Constructor Summary
Constructors Constructor Description VDateTimeCalendarPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanacceptDayFocus()Returnstrueif current resolution assumes handling focus event for day UI component.protected voiddoRenderCalendar(boolean updateDate)Performs the rendering required by theVAbstractCalendarPanel.renderCalendar(boolean).com.google.gwt.user.client.ElementgetSubPartElement(String subPart)Locates an element inside a component using the identifier provided insubPart.StringgetSubPartName(com.google.gwt.user.client.Element subElement)Provides an identifier that identifies the element within the component.protected booleanisBelowMonth(DateTimeResolution resolution)Returnstrueif theresolutionrepresentation is strictly below month (day, hour, etc..).protected booleanisDay(DateTimeResolution resolution)Returnstrueif the providedresolutionrepresents a day.protected booleanisMonth(DateTimeResolution resolution)Returnstrueif the providedresolutionrepresents a month.voidsetDate(Date currentDate)Sets the data of the Panel.voidsetResolution(DateTimeResolution resolution)Sets the current date resolution.voidsetTimeChangeListener(VDateTimeCalendarPanel.TimeChangeListener listener)The time change listener is triggered when the user changes the time.-
Methods inherited from class com.vaadin.client.ui.VAbstractCalendarPanel
contains, doSetDate, getBackwardKey, getCloseKey, getDate, getDateField, getDateTimeService, getForwardKey, getNextKey, getPreviousKey, getResetKey, getResolution, getResolution, getResolutions, getSelectKey, getSubmitListener, handleNavigation, handleNavigationDayMode, handleNavigationMonthMode, handleNavigationYearMode, isEnabled, isInitialRenderDone, isReadonly, isShowISOWeekNumbers, isYear, onBlur, onDetach, onFocus, onKeyDown, onKeyPress, onMouseDown, onMouseOut, onMouseUp, onTabOut, onValueChange, renderCalendar, renderCalendar, setAssistiveLabelNextMonth, setAssistiveLabelNextYear, setAssistiveLabelPreviousMonth, setAssistiveLabelPreviousYear, setDateStyles, setDateTimeService, setFocusChangeListener, setFocusOutListener, setParentField, setRangeEnd, setRangeStart, setShowISOWeekNumbers, setStyleName, setStylePrimaryName, setSubmitListener, updateAssistiveLabels
-
Methods inherited from class com.vaadin.client.ui.FocusableFlexTable
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, focus, setFocus
-
Methods inherited from class com.google.gwt.user.client.ui.FlexTable
addCell, getCellCount, getFlexCellFormatter, getRowCount, insertCell, insertRow, prepareCell, prepareRow, removeAllRows, removeCell, removeCells, removeRow
-
Methods inherited from class com.google.gwt.user.client.ui.HTMLTable
addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addTableListener, checkCellBounds, checkRowBounds, clear, clear, clearCell, createCell, getBodyElement, getCellForEvent, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, insertCells, internalClearCell, internalClearCell, isCellPresent, iterator, onEnsureDebugId, prepareColumn, remove, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setColumnFormatter, setHTML, setHTML, setRowFormatter, setText, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, 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, 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, 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 java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
setTimeChangeListener
public void setTimeChangeListener(VDateTimeCalendarPanel.TimeChangeListener listener)
The time change listener is triggered when the user changes the time.- Parameters:
listener- the listener to use
-
setDate
public void setDate(Date currentDate)
Description copied from class:VAbstractCalendarPanelSets the data of the Panel.- Overrides:
setDatein classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
currentDate- The date to set
-
setResolution
public void setResolution(DateTimeResolution resolution)
Description copied from class:VAbstractCalendarPanelSets the current date resolution.- Overrides:
setResolutionin classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
resolution- the new resolution
-
acceptDayFocus
protected boolean acceptDayFocus()
Description copied from class:VAbstractCalendarPanelReturnstrueif current resolution assumes handling focus event for day UI component.- Specified by:
acceptDayFocusin classVAbstractCalendarPanel<DateTimeResolution>- Returns:
trueif day focus events should be handled,falseotherwise
-
isDay
protected boolean isDay(DateTimeResolution resolution)
Description copied from class:VAbstractCalendarPanelReturnstrueif the providedresolutionrepresents a day.- Specified by:
isDayin classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
resolution- the given resolution- Returns:
trueif theresolutionrepresents a day
-
isMonth
protected boolean isMonth(DateTimeResolution resolution)
Description copied from class:VAbstractCalendarPanelReturnstrueif the providedresolutionrepresents a month.- Specified by:
isMonthin classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
resolution- the given resolution- Returns:
trueif theresolutionrepresents a month
-
isBelowMonth
protected boolean isBelowMonth(DateTimeResolution resolution)
Description copied from class:VAbstractCalendarPanelReturnstrueif theresolutionrepresentation is strictly below month (day, hour, etc..).- Specified by:
isBelowMonthin classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
resolution- the given resolution- Returns:
- whether the
resolutionis below the month resolution
-
doRenderCalendar
protected void doRenderCalendar(boolean updateDate)
Description copied from class:VAbstractCalendarPanelPerforms the rendering required by theVAbstractCalendarPanel.renderCalendar(boolean). Subclasses may override this method to provide a custom implementation avoidingVAbstractCalendarPanel.renderCalendar(boolean)override. The latter method contains a common logic which should not be overridden.- Overrides:
doRenderCalendarin classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
updateDate- The value false prevents setting the selected date of the calendar based on focusedDate. That can be used when only the resolution of the calendar is changed and no date has been selected.
-
getSubPartName
public String getSubPartName(com.google.gwt.user.client.Element subElement)
Description copied from interface:SubPartAwareProvides an identifier that identifies the element within the component. ThesubElementis a part of the component and must never be null.Note!
getSubPartElement(getSubPartName(element)) == elementis not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions withsubElementare 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 assubElementbecause interactions with the DIV and the root button element produce the same result.- Specified by:
getSubPartNamein interfaceSubPartAware- Overrides:
getSubPartNamein classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
subElement- The element the identifier string should uniquely identify- Returns:
- An identifier that uniquely identifies
subElementor null if no identifier could be provided.
-
getSubPartElement
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
Description copied from interface:SubPartAwareLocates an element inside a component using the identifier provided insubPart. ThesubPartidentifier is component specific and may be any string of characters, numbers, space characters and brackets.- Specified by:
getSubPartElementin interfaceSubPartAware- Overrides:
getSubPartElementin classVAbstractCalendarPanel<DateTimeResolution>- Parameters:
subPart- The identifier for the element inside the component- Returns:
- The element identified by subPart or null if the element could not be found.
-
-