Class CalendarView
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.google.gwt.user.datepicker.client.DatePickerComponent
com.google.gwt.user.datepicker.client.CalendarView
- All Implemented Interfaces:
HasAttachHandlers,HasHandlers,EventListener,HasVisibility,IsRenderable,IsWidget
- Direct Known Subclasses:
DefaultCalendarView
The CalendarView is a calendar grid that represents the current view of a
DatePicker. Note, the calendar view only deals with the currently
visible dates and all state is flushed when the calendar view is refreshed.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled -
Field Summary
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddStyleToDate(String styleName, Date date) Adds a style name to the cell of the supplied date.abstract DateReturns the first date that is currently shown by the calendar.abstract DateReturns the last date that is currently shown by the calendar.abstract booleanisDateEnabled(Date date) Is the cell representing the given date enabled?abstract voidremoveStyleFromDate(String styleName, Date date) Removes a visible style name from the cell of the supplied date.voidsetAriaSelectedCell(Date date) Sets aria-selected in the given date's cell and clears the other cells.abstract voidsetEnabledOnDate(boolean enabled, Date date) Enables or Disables a particular date.protected final voidsetHighlightedDate(Date date) Allows the calendar view to update the date picker's highlighted date.Methods inherited from class com.google.gwt.user.datepicker.client.DatePickerComponent
addMonths, css, getDatePicker, getModel, refresh, refreshAll, setDatePicker, setupMethods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Constructor Details
-
CalendarView
public CalendarView()Constructor.
-
-
Method Details
-
addStyleToDate
Adds a style name to the cell of the supplied date. This style is only set until the next time theCalendarViewis refreshed.- Parameters:
styleName- style name to adddate- date that will have the supplied style added
-
getFirstDate
Returns the first date that is currently shown by the calendar.- Returns:
- the first date.
-
getLastDate
Returns the last date that is currently shown by the calendar.- Returns:
- the last date.
-
isDateEnabled
Is the cell representing the given date enabled?- Parameters:
date- the date- Returns:
- is the date enabled
-
removeStyleFromDate
Removes a visible style name from the cell of the supplied date.- Parameters:
styleName- style name to removedate- date that will have the supplied style added
-
setAriaSelectedCell
Sets aria-selected in the given date's cell and clears the other cells.- Parameters:
date- the date of the cell where aria-selected should be set, or null to clear aria-selected.
-
setEnabledOnDate
Enables or Disables a particular date. by default all valid dates are enabled after a rendering event. Disabled dates cannot be selected.- Parameters:
enabled- true for enabled, false for disableddate- date to enable or disable
-
setHighlightedDate
Allows the calendar view to update the date picker's highlighted date.- Parameters:
date- the highlighted date
-