public class VCalendarPanel extends FocusableFlexTable implements com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.MouseOutHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.event.dom.client.FocusHandler, SubPartAware
Modifier and Type | Class and Description |
---|---|
static interface |
VCalendarPanel.FocusChangeListener
FocusChangeListener is notified when the panel changes its _focused_
value.
|
class |
VCalendarPanel.FocusedDate
Helper class to inform the screen reader that the user changed the
selected date.
|
static interface |
VCalendarPanel.FocusOutListener
Blur listener that listens to blur event from the panel
|
static interface |
VCalendarPanel.SubmitListener |
static interface |
VCalendarPanel.TimeChangeListener
Dispatches an event when the panel when time is changed
|
class |
VCalendarPanel.VTime
TimeSelector is a widget consisting of list boxes that modifie the Date
object that is given for.
|
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 |
---|
VCalendarPanel() |
Modifier and Type | Method and Description |
---|---|
protected int |
getBackwardKey()
The key that selects the previous day in the calendar.
|
protected int |
getCloseKey()
Returns the key that closes the popup window if this is a VPopopCalendar.
|
Date |
getDate() |
protected int |
getForwardKey()
The key that selects the next day in the calendar.
|
protected int |
getNextKey()
The key that selects the next week in the calendar.
|
protected int |
getPreviousKey()
The key that selects the previous week in the calendar.
|
protected int |
getResetKey()
Returns the reset key which will reset the calendar to the previous
selection.
|
Resolution |
getResolution() |
protected int |
getSelectKey()
Returns the select key which selects the value.
|
VCalendarPanel.SubmitListener |
getSubmitListener()
Returns the submit listener that listens to selection made from the 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 |
handleNavigation(int keycode,
boolean ctrl,
boolean shift)
Handles the keyboard navigation
|
protected boolean |
handleNavigationDayMode(int keycode,
boolean ctrl,
boolean shift)
Handle keyboard navigation what the resolution is set to DAY
|
protected boolean |
handleNavigationMonthMode(int keycode,
boolean ctrl,
boolean shift)
Handle the keyboard navigation when the resolution is set to MONTH
|
protected boolean |
handleNavigationYearMode(int keycode,
boolean ctrl,
boolean shift)
Handles the keyboard navigation when the resolution is set to years.
|
boolean |
isShowISOWeekNumbers()
Returns whether ISO 8601 week numbers should be shown in the value
selector or not.
|
void |
onBlur(com.google.gwt.event.dom.client.BlurEvent event) |
protected void |
onDetach() |
void |
onFocus(com.google.gwt.event.dom.client.FocusEvent event) |
void |
onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event) |
void |
onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event) |
void |
onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event) |
void |
onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent event) |
void |
onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event) |
protected boolean |
onTabOut(com.google.gwt.event.dom.client.DomEvent<?> event)
If true should be returned if the panel will not be used after this
event.
|
protected boolean |
onValueChange() |
void |
renderCalendar()
Updates the calendar and text field with the selected dates.
|
void |
renderCalendar(boolean updateDate)
For internal use only.
|
void |
setDate(Date currentDate)
Sets the data of the Panel.
|
void |
setDateTimeService(DateTimeService dateTimeService) |
void |
setFocusChangeListener(VCalendarPanel.FocusChangeListener listener)
The given FocusChangeListener is notified when the focused date changes
by user either clicking on a new date or by using the keyboard.
|
void |
setFocusOutListener(VCalendarPanel.FocusOutListener listener)
A focus out listener is triggered when the panel loosed focus.
|
void |
setParentField(VDateField parent) |
void |
setRangeEnd(Date newRangeEnd)
Sets the end range for this component.
|
void |
setRangeStart(Date newRangeStart)
Sets the start range for this component.
|
void |
setResolution(Resolution resolution) |
void |
setShowISOWeekNumbers(boolean showISOWeekNumbers) |
void |
setStyleName(String style) |
void |
setStylePrimaryName(String style) |
void |
setSubmitListener(VCalendarPanel.SubmitListener submitListener)
The submit listener is called when the user selects a value from the
calender either by clicking the day or selects it by keyboard.
|
void |
setTimeChangeListener(VCalendarPanel.TimeChangeListener listener)
The time change listener is triggered when the user changes the time.
|
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 setParentField(VDateField parent)
protected boolean onValueChange()
public Resolution getResolution()
public void setResolution(Resolution resolution)
public 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
public void setDateTimeService(DateTimeService dateTimeService)
public boolean isShowISOWeekNumbers()
public void setShowISOWeekNumbers(boolean showISOWeekNumbers)
public void renderCalendar()
public void renderCalendar(boolean updateDate)
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 void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
onKeyDown
in interface com.google.gwt.event.dom.client.KeyDownHandler
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
onKeyPress
in interface com.google.gwt.event.dom.client.KeyPressHandler
protected boolean handleNavigationYearMode(int keycode, boolean ctrl, boolean shift)
keycode
- The keycode to processctrl
- Is ctrl pressed?shift
- is shift pressedprotected boolean handleNavigationMonthMode(int keycode, boolean ctrl, boolean shift)
keycode
- The keycode to handlectrl
- Was the ctrl key pressed?shift
- Was the shift key pressed?protected boolean handleNavigationDayMode(int keycode, boolean ctrl, boolean shift)
keycode
- The keycode to handlectrl
- Was the ctrl key pressed?shift
- Was the shift key pressed?protected boolean handleNavigation(int keycode, boolean ctrl, boolean shift)
keycode
- The key code that was pressedctrl
- Was the ctrl key pressedshift
- Was the shift key pressedprotected int getResetKey()
protected int getSelectKey()
protected int getCloseKey()
protected int getForwardKey()
protected int getBackwardKey()
protected int getNextKey()
protected int getPreviousKey()
public void onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent event)
onMouseOut
in interface com.google.gwt.event.dom.client.MouseOutHandler
public void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
onMouseDown
in interface com.google.gwt.event.dom.client.MouseDownHandler
public void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
onMouseUp
in interface com.google.gwt.event.dom.client.MouseUpHandler
public void setDate(Date currentDate)
currentDate
- The date to setpublic Date getDate()
protected boolean onTabOut(com.google.gwt.event.dom.client.DomEvent<?> event)
event
- public void setFocusOutListener(VCalendarPanel.FocusOutListener listener)
listener
- The listener to triggerpublic void setSubmitListener(VCalendarPanel.SubmitListener submitListener)
submitListener
- The listener to triggerpublic void setFocusChangeListener(VCalendarPanel.FocusChangeListener listener)
listener
- The FocusChangeListener to be notifiedpublic void setTimeChangeListener(VCalendarPanel.TimeChangeListener listener)
listener
- public VCalendarPanel.SubmitListener getSubmitListener()
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur
in interface com.google.gwt.event.dom.client.BlurHandler
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus
in interface com.google.gwt.event.dom.client.FocusHandler
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
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
subPart
- The identifier for the element inside the componentprotected void onDetach()
onDetach
in class com.google.gwt.user.client.ui.Widget
public void setRangeStart(Date newRangeStart)
startDate
- - the allowed range's start datepublic void setRangeEnd(Date newRangeEnd)
endDate
- - the allowed range's end dateCopyright © 2019 Vaadin Ltd. All rights reserved.