Class DefaultCalendarView

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsRenderable, IsWidget

public final class DefaultCalendarView extends CalendarView
Simple calendar view. Not extensible as we wish to evolve it freely over time.
  • Constructor Details

    • DefaultCalendarView

      public DefaultCalendarView()
      Constructor.
  • Method Details

    • addStyleToDate

      public void addStyleToDate(String styleName, Date date)
      Description copied from class: CalendarView
      Adds a style name to the cell of the supplied date. This style is only set until the next time the CalendarView is refreshed.
      Specified by:
      addStyleToDate in class CalendarView
      Parameters:
      styleName - style name to add
      date - date that will have the supplied style added
    • getFirstDate

      public Date getFirstDate()
      Description copied from class: CalendarView
      Returns the first date that is currently shown by the calendar.
      Specified by:
      getFirstDate in class CalendarView
      Returns:
      the first date.
    • getLastDate

      public Date getLastDate()
      Description copied from class: CalendarView
      Returns the last date that is currently shown by the calendar.
      Specified by:
      getLastDate in class CalendarView
      Returns:
      the last date.
    • isDateEnabled

      public boolean isDateEnabled(Date d)
      Description copied from class: CalendarView
      Is the cell representing the given date enabled?
      Specified by:
      isDateEnabled in class CalendarView
      Parameters:
      d - the date
      Returns:
      is the date enabled
    • refresh

      public void refresh()
      Description copied from class: DatePickerComponent
      Refresh the component. Usually called because the model's current date has changed. In general, only should be called by DatePicker. Use refreshAll() if you need to refresh all components.
      Specified by:
      refresh in class DatePickerComponent
    • removeStyleFromDate

      public void removeStyleFromDate(String styleName, Date date)
      Description copied from class: CalendarView
      Removes a visible style name from the cell of the supplied date.
      Specified by:
      removeStyleFromDate in class CalendarView
      Parameters:
      styleName - style name to remove
      date - date that will have the supplied style added
    • setAriaSelectedCell

      public void setAriaSelectedCell(Date date)
      Description copied from class: CalendarView
      Sets aria-selected in the given date's cell and clears the other cells.
      Overrides:
      setAriaSelectedCell in class CalendarView
      Parameters:
      date - the date of the cell where aria-selected should be set, or null to clear aria-selected.
    • setEnabledOnDate

      public void setEnabledOnDate(boolean enabled, Date date)
      Description copied from class: CalendarView
      Enables or Disables a particular date. by default all valid dates are enabled after a rendering event. Disabled dates cannot be selected.
      Specified by:
      setEnabledOnDate in class CalendarView
      Parameters:
      enabled - true for enabled, false for disabled
      date - date to enable or disable
    • setup

      public void setup()
      Description copied from class: DatePickerComponent
      Set up the component.
      Specified by:
      setup in class DatePickerComponent