Package com.flowingcode.addons.ycalendar
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
A base abstract class for calendar components, with additional methods used for i18n initialization
and listener registration.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDateSelectedListener(ComponentEventListener<DateSelectedEvent<? super COMPONENT>> listener) Adds a date selection listener.protected voidonAttach(AttachEvent attachEvent) abstract voidvoidSets the i18n object.Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
AbstractCalendarComponent
public AbstractCalendarComponent()
-
-
Method Details
-
onAttach
-
setI18n
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
-