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 interface
VDateTimeCalendarPanel.TimeChangeListener
Dispatches an event when the panel when time is changed.
class
VDateTimeCalendarPanel.VTime
TimeSelector 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 Modifier and Type Method Description protected boolean
acceptDayFocus()
Returns
true
if current resolution assumes handling focus event for day UI component.protected void
doRenderCalendar(boolean updateDate)
Performs the rendering required by the
VAbstractCalendarPanel.renderCalendar(boolean)
.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
isBelowMonth(DateTimeResolution resolution)
Returns
true
if theresolution
representation is strictly below month (day, hour, etc..).protected boolean
isDay(DateTimeResolution resolution)
Returns
true
if the providedresolution
represents a day.protected boolean
isMonth(DateTimeResolution resolution)
Returns
true
if the providedresolution
represents a month.void
setDate(Date currentDate)
Sets the data of the Panel.
void
setResolution(DateTimeResolution resolution)
Sets the current date resolution.
void
setTimeChangeListener(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:
VAbstractCalendarPanel
Sets the data of the Panel.
Overrides:
setDate
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
currentDate
- The date to set
-
setResolution
public void setResolution(DateTimeResolution resolution)
Description copied from class:
VAbstractCalendarPanel
Sets the current date resolution.
Overrides:
setResolution
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
resolution
- the new resolution
-
acceptDayFocus
protected boolean acceptDayFocus()
Description copied from class:
VAbstractCalendarPanel
Returns
true
if current resolution assumes handling focus event for day UI component.Specified by:
acceptDayFocus
in classVAbstractCalendarPanel<DateTimeResolution>
Returns:
true
if day focus events should be handled,false
otherwise
-
isDay
protected boolean isDay(DateTimeResolution resolution)
Description copied from class:
VAbstractCalendarPanel
Returns
true
if the providedresolution
represents a day.Specified by:
isDay
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
resolution
- the given resolutionReturns:
true
if theresolution
represents a day
-
isMonth
protected boolean isMonth(DateTimeResolution resolution)
Description copied from class:
VAbstractCalendarPanel
Returns
true
if the providedresolution
represents a month.Specified by:
isMonth
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
resolution
- the given resolutionReturns:
true
if theresolution
represents a month
-
isBelowMonth
protected boolean isBelowMonth(DateTimeResolution resolution)
Description copied from class:
VAbstractCalendarPanel
Returns
true
if theresolution
representation is strictly below month (day, hour, etc..).Specified by:
isBelowMonth
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
resolution
- the given resolutionReturns:
whether the
resolution
is below the month resolution
-
doRenderCalendar
protected void doRenderCalendar(boolean updateDate)
Description copied from class:
VAbstractCalendarPanel
Performs the rendering required by the
VAbstractCalendarPanel.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:
doRenderCalendar
in 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:
SubPartAware
Provides an identifier that identifies the element within the component. The
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 withsubElement
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 assubElement
because interactions with the DIV and the root button element produce the same result.Specified by:
getSubPartName
in interfaceSubPartAware
Overrides:
getSubPartName
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
subElement
- The element the identifier string should uniquely identifyReturns:
An identifier that uniquely identifies
subElement
or null if no identifier could be provided.
-
getSubPartElement
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
Description copied from interface:
SubPartAware
Locates an element inside a component using the identifier provided in
subPart
. ThesubPart
identifier is component specific and may be any string of characters, numbers, space characters and brackets.Specified by:
getSubPartElement
in interfaceSubPartAware
Overrides:
getSubPartElement
in classVAbstractCalendarPanel<DateTimeResolution>
Parameters:
subPart
- The identifier for the element inside the componentReturns:
The element identified by subPart or null if the element could not be found.
-
-