public class VDateTimeCalendarPanel extends VAbstractCalendarPanel<DateTimeResolution>
Modifier and Type | Class and 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.
|
VAbstractCalendarPanel.FocusChangeListener, VAbstractCalendarPanel.FocusedDate, VAbstractCalendarPanel.FocusOutListener, VAbstractCalendarPanel.SubmitListener
com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter
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 and Description |
---|
VDateTimeCalendarPanel() |
Modifier and Type | Method and 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 the resolution representation is strictly
below month (day, hour, etc..). |
protected boolean |
isDay(DateTimeResolution resolution)
Returns
true if the provided resolution represents a day. |
protected boolean |
isMonth(DateTimeResolution resolution)
Returns
true if the provided resolution represents a
month. |
void |
setDate(Date currentDate)
Sets the data of the Panel.
|
void |
setResolution(DateTimeResolution resolution) |
void |
setTimeChangeListener(VDateTimeCalendarPanel.TimeChangeListener listener)
The time change listener is triggered when the user changes the time.
|
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
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, focus, setFocus
addCell, getCellCount, getFlexCellFormatter, getRowCount, insertCell, insertRow, prepareCell, prepareRow, removeAllRows, removeCell, removeCells, removeRow
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
add, add, adopt, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public void setTimeChangeListener(VDateTimeCalendarPanel.TimeChangeListener listener)
listener
- public void setDate(Date currentDate)
VAbstractCalendarPanel
setDate
in class VAbstractCalendarPanel<DateTimeResolution>
currentDate
- The date to setpublic void setResolution(DateTimeResolution resolution)
setResolution
in class VAbstractCalendarPanel<DateTimeResolution>
protected boolean acceptDayFocus()
VAbstractCalendarPanel
true
if current resolution assumes handling focus event
for day UI component.acceptDayFocus
in class VAbstractCalendarPanel<DateTimeResolution>
true
if day focus events should be handled, false
otherwiseprotected boolean isDay(DateTimeResolution resolution)
VAbstractCalendarPanel
true
if the provided resolution
represents a day.isDay
in class VAbstractCalendarPanel<DateTimeResolution>
resolution
- the given resolutiontrue
if the resolution
represents a dayprotected boolean isMonth(DateTimeResolution resolution)
VAbstractCalendarPanel
true
if the provided resolution
represents a
month.isMonth
in class VAbstractCalendarPanel<DateTimeResolution>
resolution
- the given resolutiontrue
if the resolution
represents a monthprotected boolean isBelowMonth(DateTimeResolution resolution)
VAbstractCalendarPanel
true
if the resolution
representation is strictly
below month (day, hour, etc..).isBelowMonth
in class VAbstractCalendarPanel<DateTimeResolution>
resolution
- the given resolutionresolution
is below the month resolutionprotected void doRenderCalendar(boolean updateDate)
VAbstractCalendarPanel
VAbstractCalendarPanel.renderCalendar(boolean)
.
Subclasses may override this method to provide a custom implementation
avoiding VAbstractCalendarPanel.renderCalendar(boolean)
override. The latter method
contains a common logic which should not be overridden.doRenderCalendar
in class VAbstractCalendarPanel<DateTimeResolution>
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.public 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 VAbstractCalendarPanel<DateTimeResolution>
subElement
- The element the identifier string should uniquely identifysubElement
or null
if no identifier could be provided.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 VAbstractCalendarPanel<DateTimeResolution>
subPart
- The identifier for the element inside the componentCopyright © 2018 Vaadin Ltd. All rights reserved.