public abstract class CalendarView extends Composite
DatePicker
. Note, the calendar view only deals with the currently
visible dates and all state is flushed when the calendar view is refreshed.UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Constructor and Description |
---|
CalendarView()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addMonths(int numMonths) |
abstract void |
addStyleToDate(String styleName,
Date date)
Adds a style name to the cell of the supplied date.
|
protected DatePicker |
getDatePicker() |
abstract Date |
getFirstDate()
Returns the first date that is currently shown by the calendar.
|
abstract Date |
getLastDate()
Returns the last date that is currently shown by the calendar.
|
CalendarModel |
getModel() |
abstract boolean |
isDateEnabled(Date date)
Is the cell representing the given date enabled?
|
protected abstract void |
refresh()
Refresh the component.
|
protected void |
refreshAll()
|
abstract void |
removeStyleFromDate(String styleName,
Date date)
Removes a visible style name from the cell of the supplied date.
|
void |
setAriaSelectedCell(Date date)
Sets aria-selected in the given date's cell and clears the other cells.
|
abstract void |
setEnabledOnDate(boolean enabled,
Date date)
Enables or Disables a particular date.
|
protected void |
setHighlightedDate(Date date)
Allows the calendar view to update the date picker's highlighted date.
|
protected abstract void |
setup()
Set up the component.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
public abstract void addStyleToDate(String styleName, Date date)
CalendarView
is refreshed.styleName
- style name to adddate
- date that will have the supplied style addedpublic abstract Date getFirstDate()
public abstract Date getLastDate()
public abstract boolean isDateEnabled(Date date)
date
- the datepublic abstract void removeStyleFromDate(String styleName, Date date)
styleName
- style name to removedate
- date that will have the supplied style addedpublic void setAriaSelectedCell(Date date)
date
- the date of the cell where aria-selected should be set,
or null to clear aria-selected.public abstract void setEnabledOnDate(boolean enabled, Date date)
enabled
- true for enabled, false for disableddate
- date to enable or disableprotected final void setHighlightedDate(Date date)
date
- the highlighted datepublic CalendarModel getModel()
protected void addMonths(int numMonths)
protected DatePicker getDatePicker()
protected abstract void refresh()
DatePicker
. Use
refreshAll() if you need to refresh all components.protected void refreshAll()
protected abstract void setup()
Copyright © 2018. All rights reserved.