Class AbstractCalendarComponent<COMPONENT extends Component>

java.lang.Object
com.vaadin.flow.component.Component
com.flowingcode.addons.ycalendar.AbstractCalendarComponent<COMPONENT>
All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasStyle, Serializable
Direct Known Subclasses:
MonthCalendar, YearCalendar

public abstract class AbstractCalendarComponent<COMPONENT extends Component> extends Component
A base abstract class for calendar components, with additional methods used for i18n initialization and listener registration.
See Also:
  • Constructor Details

    • AbstractCalendarComponent

      public AbstractCalendarComponent()
  • Method Details

    • onAttach

      protected void onAttach(AttachEvent attachEvent)
      Overrides:
      onAttach in class Component
    • setI18n

      public void setI18n(DatePicker.DatePickerI18n i18n)
      Sets the i18n object.
      Parameters:
      i18n - the DatepickerI18n object used to initialize i18n
    • refreshAll

      public abstract void refreshAll()
    • addDateSelectedListener

      public Registration addDateSelectedListener(ComponentEventListener<DateSelectedEvent<? super COMPONENT>> listener)
      Adds a date selection listener. The listener is called when the user selects a given date.
      Parameters:
      listener - the value change listener, not null
      Returns:
      a registration for the listener