Class FullCalendar
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,Serializable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
Component provides event rendering, drag-and-drop functionality, event editing, and customizable display modes.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected CurrentAuthentication
protected Map<String,
AbstractDataProviderManager> protected Function<DayCellBottomTextClassNamesContext,
List<String>> protected Function<DayCellBottomTextContext,
String> protected Function<DayCellClassNamesContext,
List<String>> protected Function<DayHeaderClassNamesContext,
List<String>> protected FullCalendarI18n
protected Object
protected FullCalendarI18n
protected Function<MoreLinkClassNamesContext,
List<String>> protected Messages
protected Function<NowIndicatorClassNamesContext,
List<String>> protected Object
protected Function<SlotLabelClassNamesContext,
List<String>> Fields inherited from class io.jmix.fullcalendarflowui.kit.component.JmixFullCalendar
currentDate, dateClickDomRegistration, datesSetDomRegistration, dayNavigationLinkClickDomRegistration, deserializer, displayMode, eventClickDomRegistration, eventDropDomRegistration, eventMouseEnterDomRegistration, eventMouseLeaveDomRegistration, eventResizeDomRegistration, incrementalUpdateExecution, initialized, itemsDataProvidersExecutionMap, jsonFactory, moreLinkClickDomRegistration, options, selectDomRegistration, serializer, synchronizeOptionsExecution, unselectDomRegistration, weekNavigationLinkClickDomRegistration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataProvider
(CallbackCalendarDataProvider dataProvider) Adds new lazy data provider.void
addDataProvider
(ItemsCalendarDataProvider dataProvider) Adds new data provider.protected void
addDataProviderInternal
(AbstractDataProviderManager dataProviderManager) protected void
com.vaadin.flow.shared.Registration
addDateClickListener
(com.vaadin.flow.component.ComponentEventListener<DateClickEvent> listener) Adds a listener that is invoked when day cell or time cell is clicked.com.vaadin.flow.shared.Registration
addDatesSetListener
(com.vaadin.flow.component.ComponentEventListener<DatesSetEvent> listener) Adds dates set listener.com.vaadin.flow.shared.Registration
addDayNavigationLinkClickListener
(com.vaadin.flow.component.ComponentEventListener<DayNavigationLinkClickEvent> listener) Adds day navigation link click listener.com.vaadin.flow.shared.Registration
addEventClickListener
(com.vaadin.flow.component.ComponentEventListener<EventClickEvent> listener) Adds an event click listener.com.vaadin.flow.shared.Registration
addEventDropListener
(com.vaadin.flow.component.ComponentEventListener<EventDropEvent> listener) Adds a listener that is invoked when dragging stops and the event has moved to a different day/time cell.com.vaadin.flow.shared.Registration
addEventMouseEnterListener
(com.vaadin.flow.component.ComponentEventListener<EventMouseEnterEvent> listener) Adds a listener that is invoked when the user mouses over a calendar event.com.vaadin.flow.shared.Registration
addEventMouseLeaveListener
(com.vaadin.flow.component.ComponentEventListener<EventMouseLeaveEvent> listener) Adds a listener that is invoked when the user mouses out of a calendar event.com.vaadin.flow.shared.Registration
addEventResizeListener
(com.vaadin.flow.component.ComponentEventListener<EventResizeEvent> listener) Adds a listener that is invoked when resizing stops and the calendar event has changed in duration.com.vaadin.flow.shared.Registration
addMoreLinkClickListener
(com.vaadin.flow.component.ComponentEventListener<MoreLinkClickEvent> listener) Adds a "more" link click listener.com.vaadin.flow.shared.Registration
addSelectListener
(com.vaadin.flow.component.ComponentEventListener<SelectEvent> listener) Adds a listener that is invoked when a date/time selection is made.com.vaadin.flow.shared.Registration
addUnselectListener
(com.vaadin.flow.component.ComponentEventListener<UnselectEvent> listener) Adds a listener that is invoked when the current selection is cleared.com.vaadin.flow.shared.Registration
addWeekNavigationLinkClickListener
(com.vaadin.flow.component.ComponentEventListener<WeekNavigationLinkClickEvent> listener) Adds week navigation link click listener.void
protected void
applyChangesToCalendarEvent
(CalendarEvent calendarEvent, DomCalendarEvent clientEvent) protected void
protected elemental.json.JsonObject
protected CallbackDataProviderManager
protected ItemsDataProviderManager
createDataProviderManager
(ItemsCalendarDataProvider dataProvider) protected FullCalendarI18n
protected CalendarDuration
createDelta
(DomCalendarDuration clientDuration) protected DisplayModeInfo
createDisplayModeInfo
(DomViewInfo clientViewInfo) protected MoreLinkClickEvent.DataProviderContext
createMoreLinkDataProviderContext
(AbstractDataProviderManager dataProviderManager, List<DomCalendarEvent> allEvents, List<DomCalendarEvent> hiddenEvents) protected List<MoreLinkClickEvent.DataProviderContext>
protected AbstractEventMoveEvent.OldValues
createOldValues
(DomCalendarEvent clientEvent) protected FullCalendarOptions
protected JmixFullCalendarSerializer
protected elemental.json.JsonArray
fetchCalendarItems
(String sourceId, String start, String end) protected CalendarEvent
getCalendarEvent
(DomCalendarEvent clientEvent, AbstractDataProviderManager dataProviderManager) protected TimeZone
protected ZoneId
<T extends CalendarDataProvider>
TReturns a data provider by its ID.protected AbstractDataProviderManager
getDataProviderManager
(String sourceId) protected elemental.json.JsonObject
getDayCellBottomTextInfo
(elemental.json.JsonObject jsonContext) protected elemental.json.JsonArray
getDayCellClassNames
(elemental.json.JsonObject jsonContext) protected elemental.json.JsonArray
getDayHeaderClassNames
(elemental.json.JsonObject jsonContext) protected CalendarDisplayMode
getDisplayMode
(String id) Method is overridden to make it available fromFullCalendarUtils.getDisplayMode(FullCalendar, String)
.getI18n()
protected String
getMessage
(String key) protected elemental.json.JsonArray
getMoreLinkClassNames
(elemental.json.JsonObject jsonContext) protected elemental.json.JsonArray
getNowIndicatorClassNames
(elemental.json.JsonObject jsonContext) protected FullCalendarOptions
getRelatedDataProviderContexts
(List<DomCalendarEvent> relatedEvents) protected List<CalendarEvent>
getRelatedEvents
(List<DomCalendarEvent> relatedEvents) Returns all related calendar events, even if they are from different data providers.protected FullCalendarSerializer
protected elemental.json.JsonArray
getSlotLabelClassNames
(elemental.json.JsonObject jsonContext) protected void
protected void
boolean
boolean
boolean
protected void
onDateClick
(DateClickDomEvent event) protected void
onDatesSet
(DatesSetDomEvent event) protected void
protected void
onEventClick
(EventClickDomEvent event) protected void
onEventDrop
(EventDropDomEvent event) protected void
protected void
protected void
onEventResize
(EventResizeDomEvent event) protected void
protected void
protected void
onSelect
(SelectDomEvent event) protected void
onUnselect
(UnselectDomEvent event) protected void
protected void
performIncrementalDataUpdate
(com.vaadin.flow.internal.ExecutionContext context) protected void
performUpdateItemDataProvider
(String dataProviderId) void
Removes all data providers from the component.void
removeDataProvider
(CalendarDataProvider dataProvider) Removes a data provider from the component.void
Removes a data provider from the component by ID.protected void
protected void
requestUpdateItemDataProvider
(String dataProviderId) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setBusinessHours
(List<CalendarBusinessHours> businessHours) Sets a list of business hours entries.void
setDayCellBottomTextClassNamesGenerator
(Function<DayCellBottomTextClassNamesContext, List<String>> dayCellBottomTextClassNamesGenerator) Sets bottom text class names generator.void
setDayCellBottomTextGenerator
(Function<DayCellBottomTextContext, String> dayCellBottomTextGenerator) Sets bottom text generator for day cells.void
setDayCellClassNamesGenerator
(Function<DayCellClassNamesContext, List<String>> dayCellClassNamesGenerator) Sets a day cell class names generator.void
setDayHeaderClassNamesGenerator
(Function<DayHeaderClassNamesContext, List<String>> classNamesGenerator) Sets a class names generator for day headers.void
setDefaultBusinessHoursEnabled
(boolean enabled) Enables default business hours.void
setEventConstraintBusinessHours
(List<CalendarBusinessHours> businessHours) Sets a list of business hours that limits the dragging and resizing of events.void
setEventConstraintBusinessHoursEnabled
(boolean enabled) Sets whether events being dragged or resized must be fully contained within the week’s business hours.void
setEventConstraintGroupId
(Object groupId) Sets a group ID to limit the dragging and resizing of events.void
setEventDisplay
(Display display) Sets the display mode that controls the appearance of all events that do not specify display mode.void
setHiddenDays
(List<DayOfWeek> hiddenDays) Sets the list of days that will be excluded from being displayed.void
setI18n
(FullCalendarI18n i18n) Set the internationalization properties for this component.protected void
void
setMoreLinkClassNamesGenerator
(Function<MoreLinkClassNamesContext, List<String>> classNamesGenerator) Sets a class names generator for "more" link.void
setNowIndicatorClassNamesGenerator
(Function<NowIndicatorClassNamesContext, List<String>> nowIndicatorClassNamesGenerator) Sets a now-indicator class names generator.void
setSelectConstraintBusinessHours
(List<CalendarBusinessHours> businessHours) Sets a list of business hours that limits the selection.void
setSelectConstraintBusinessHoursEnabled
(boolean enabled) Sets whether the selection must be fully contained within the week’s business hours.void
setSelectConstraintGroupId
(Object groupId) Sets a group ID to limit selection.void
setSlotLabelClassNamesGenerator
(Function<SlotLabelClassNamesContext, List<String>> slotLabelClassNamesGenerator) Sets a slot label class-names generator.protected void
protected void
protected void
protected void
protected void
protected void
protected List<CalendarEvent>
toCalendarEvents
(AbstractDataProviderManager dataProviderManager, List<DomCalendarEvent> segments) protected List<CalendarEvent>
toCalendarEvents
(List<DomCalendarEvent> events) protected LocalDateTime
toLocalDateTime
(String isoDateTime) Returns date-time as is from client without transformationprotected LocalDateTime
transformToLocalDateTime
(String isoDateTime) Returns transformed date-time from component's time zone to system default (TimeZone.getDefault()
).Methods inherited from class io.jmix.fullcalendarflowui.kit.component.JmixFullCalendar
addCustomCalendarDisplayMode, addMoreLinkClassName, addMoreLinkClassNames, attachCalendarOptionChangeListener, attachDateClickDomEventListener, attachDatesSetDomEventListener, attachDayNavigationLinkClickDomEventListener, attachEventClickDomEventListener, attachEventDropDomEventListener, attachEventMouseEnterDomEventListener, attachEventMouseLeaveDomEventListener, attachEventResizeDomEventListener, attachMoreLinkClickDomEventListener, attachSelectDomEventListener, attachUnselectDomEventListener, attachWeekNavigationLinkClickDomEventListener, createDeserializer, createJsonFactory, detachDateClickDomEventListener, detachEventClickDomEventListener, detachEventDropDomEventListener, detachEventMouseEnterDomEventListener, detachEventMouseLeaveDomEventListener, detachEventResizeDomEventListener, detachSelectDomEventListener, detachUnselectDomEventListener, getCalendarDisplayModeProperties, getCurrentCalendarDisplayMode, getCustomCalendarDisplayMode, getCustomCalendarDisplayModes, getDate, getDateAlignment, getDateIncrement, getDayMaxEventRows, getDayMaxEvents, getDefaultAllDayEventDuration, getDefaultDayHeaderFormat, getDefaultDayPopoverFormat, getDefaultEventTimeFormat, getDefaultSlotLabelFormat, getDefaultTimedEventDuration, getDefaultWeekNumberFormat, getDragRevertDuration, getEventBackgroundColor, getEventBorderColor, getEventDragMinDistance, getEventLongPressDelay, getEventMaxStack, getEventOrder, getEventOrderJsFunction, getEventOverlapJsFunction, getEventTextColor, getInitialCalendarDisplayMode, getInitialDate, getMoreLinkCalendarDisplayMode, getMoreLinkClassNames, getNextDayThreshold, getScrollTime, getSelectAllowJsFunction, getSelectLongPressDelay, getSelectMinDistance, getSelectOverlapJsFunction, getSlotDuration, getSlotLabelInterval, getSlotMaxTime, getSlotMinTime, getSnapDuration, getTimeZone, getUnselectCancelSelector, getValidRangeEnd, getValidRangeStart, getVisibleRangeEnd, getVisibleRangeStart, getWindowResizeDelay, inverseDuration, isAllMaintainDurationEnabled, isDayHeadersVisible, isDefaultAllDay, isDefaultDayMaxEventRowsEnabled, isDefaultDayMaxEventsEnabled, isDisplayEventTime, isDragScroll, isEventDurationEditable, isEventInteractive, isEventOrderStrict, isEventOverlap, isEventResizableFromStart, isEventStartEditable, isExpandRows, isForceEventDuration, isNavigationLinksEnabled, isNowIndicatorVisible, isProgressiveEventRendering, isScrollTimeReset, isSelectionEnabled, isSelectMirror, isSelectOverlap, isUnselectAuto, isWeekendsVisible, isWeekNumbersVisible, navigateToDate, navigateToNext, navigateToNext, navigateToPrevious, navigateToPrevious, navigateToToday, onAttach, onOptionChange, performCompleteInit, performUpdateOptions, removeAllMoreLinkClassName, removeCustomCalendarDisplayMode, removeMoreLinkClassName, requestUpdateOptions, scrollToTime, scrollToTime, select, select, select, select, setAllDayMaintainDurationEnabled, setCalendarDisplayMode, setDateAlignment, setDateIncrement, setDayHeadersVisible, setDayMaxEventRows, setDayMaxEvents, setDefaultAllDay, setDefaultAllDayEventDuration, setDefaultDayHeaderFormat, setDefaultDayMaxEventRowsEnabled, setDefaultDayMaxEventsEnabled, setDefaultDayPopoverFormat, setDefaultEventTimeFormat, setDefaultSlotLabelFormat, setDefaultTimedEventDuration, setDefaultWeekNumberFormat, setDisplayEventTime, setDragRevertDuration, setDragScroll, setEventBackgroundColor, setEventBorderColor, setEventDragMinDistance, setEventDurationEditable, setEventInteractive, setEventLongPressDelay, setEventMaxStack, setEventOrder, setEventOrderJsFunction, setEventOrderStrict, setEventOverlap, setEventOverlapJsFunction, setEventResizableFromStart, setEventStartEditable, setEventTextColor, setExpandRows, setForceEventDuration, setInitialCalendarDisplayMode, setInitialDate, setMoreLinkCalendarDisplayMode, setMoreLinkClassNames, setNavigationLinksEnabled, setNextDayThreshold, setNowIndicatorVisible, setProgressiveEventRendering, setScrollTime, setScrollTimeReset, setSelectAllowJsFunction, setSelectionEnabled, setSelectLongPressDelay, setSelectMinDistance, setSelectMirror, setSelectOverlap, setSelectOverlapJsFunction, setSlotDuration, setSlotLabelInterval, setSlotMaxTime, setSlotMinTime, setSnapDuration, setTimeZone, setUnselectAuto, setUnselectCancelSelector, setValidRange, setValidRangeEnd, setValidRangeStart, setVisibleRange, setWeekendsVisible, setWeekNumbersVisible, setWindowResizeDelay, unselect, updateInitialOptions
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, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
currentAuthentication
-
messages
-
dataProvidersMap
-
linkMoreClassNamesGenerator
-
dayHeaderClassNamesGenerator
-
dayCellClassNamesGenerator
-
slotLabelClassNamesGenerator
-
nowIndicatorClassNamesGenerator
-
dayCellBottomTextClassNamesGenerator
protected Function<DayCellBottomTextClassNamesContext,List<String>> dayCellBottomTextClassNamesGenerator -
dayCellBottomTextGenerator
-
eventConstraintGroupId
-
selectConstraintGroupId
-
defaultI18n
-
explicitI18n
-
-
Constructor Details
-
FullCalendar
public FullCalendar()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
autoWireDependencies
protected void autoWireDependencies() -
initComponent
protected void initComponent() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getDataProviders
- Returns:
- a list of data providers
-
getDataProvider
Returns a data provider by its ID.- Type Parameters:
T
- type of data provider- Parameters:
id
- data provider ID- Returns:
- data provider or
null
if there is no data provider with passed ID
-
addDataProvider
Adds new lazy data provider.- Parameters:
dataProvider
- lazy data provider to add
-
addDataProvider
Adds new data provider.- Parameters:
dataProvider
- data provider to add
-
removeDataProvider
Removes a data provider from the component.- Parameters:
dataProvider
- data provider to remove
-
removeDataProvider
Removes a data provider from the component by ID.- Parameters:
id
- ID of data provider to remove
-
removeAllDataProviders
public void removeAllDataProviders()Removes all data providers from the component. -
isEventConstraintBusinessHoursEnabled
public boolean isEventConstraintBusinessHoursEnabled()- Returns:
true
if business hours used as event constraint
-
setEventConstraintBusinessHoursEnabled
public void setEventConstraintBusinessHoursEnabled(boolean enabled) Sets whether events being dragged or resized must be fully contained within the week’s business hours.It also respects custom business hours
setBusinessHours(List)
.The default value is
false
.- Parameters:
enabled
- whether to use business hours as event constraint
-
getEventConstraintGroupId
- Returns:
- a group ID that limits dragging and resizing events or
null
if not set
-
setEventConstraintGroupId
Sets a group ID to limit the dragging and resizing of events. Events that are being dragged or resized must be fully contained by at least one of the events linked to by the given group ID.Takes precedence over
setEventConstraintBusinessHoursEnabled(boolean)
.The group ID can be an entity instance, string, enum or other types.
- Parameters:
groupId
- a group ID
-
getEventConstraintBusinessHours
- Returns:
- a list of business hours that limits the dragging and resizing of events
-
setEventConstraintBusinessHours
Sets a list of business hours that limits the dragging and resizing of events.Takes precedence over
setEventConstraintGroupId(Object)
andsetEventConstraintBusinessHoursEnabled(boolean)
- Parameters:
businessHours
- business hours that will be available for event dragging and resizing
-
getSelectConstraintGroupId
- Returns:
- a group ID to limit selection or
null
if not set
-
isSelectConstraintBusinessHoursEnabled
public boolean isSelectConstraintBusinessHoursEnabled()- Returns:
true
is business hours used as selection constraint
-
setSelectConstraintBusinessHoursEnabled
public void setSelectConstraintBusinessHoursEnabled(boolean enabled) Sets whether the selection must be fully contained within the week’s business hours.It also respects custom business hours
setBusinessHours(List)
.Note, this property will be applied if
JmixFullCalendar.setSelectionEnabled(boolean)
is enabled.The default value is
false
.- Parameters:
enabled
- whether to use business hours as selection constraint
-
setSelectConstraintGroupId
Sets a group ID to limit selection. If group ID is set, only cells with events that contain the same group ID can be selected.Takes precedence over
setSelectConstraintBusinessHoursEnabled(boolean)
.Note, this property will be applied if
JmixFullCalendar.setSelectionEnabled(boolean)
is enabled.- Parameters:
groupId
- a group ID
-
getSelectConstraintBusinessHours
- Returns:
- a list of business hours that limits the selection
-
setSelectConstraintBusinessHours
Sets a list of business hours that limits the selection.Takes precedence over
setSelectConstraintBusinessHoursEnabled(boolean)
andsetSelectConstraintGroupId(Object)
.- Parameters:
businessHours
- business hours that will be available for selection
-
isDefaultBusinessHoursEnabled
public boolean isDefaultBusinessHoursEnabled()- Returns:
true
if default business hours enabled
-
setDefaultBusinessHoursEnabled
public void setDefaultBusinessHoursEnabled(boolean enabled) Enables default business hours. The default business hour is: [monday-friday] from 9 AM to 5 PM.Disabled by default.
- Parameters:
enabled
- whether to enable business hours
-
getBusinessHours
- Returns:
- a list of business hours entries
-
setBusinessHours
Sets a list of business hours entries.Takes precedence over
setDefaultBusinessHoursEnabled(boolean)
.- Parameters:
businessHours
- list of custom entries of business hours
-
getHiddenDays
- Returns:
- hidden days of week
-
setHiddenDays
Sets the list of days that will be excluded from being displayed.By default, all days of week are visible unless
JmixFullCalendar.setWeekendsVisible(boolean)
is set tofalse
.- Parameters:
hiddenDays
- days to hide
-
getI18n
- Returns:
- the internationalization properties for this component or
null
if not set
-
setI18n
Set the internationalization properties for this component. Thenull
value resets to default values.- Parameters:
i18n
- the internationalized properties
-
getEventDisplay
- Returns:
- display mode for events or
null
if not set
-
setEventDisplay
Sets the display mode that controls the appearance of all events that do not specify display mode.To control the display of specific events, use the display property of calendar event
CalendarEvent.getDisplay()
.The default value is
Display.AUTO
.- Parameters:
display
- display mode for events
-
addDatesSetListener
public com.vaadin.flow.shared.Registration addDatesSetListener(com.vaadin.flow.component.ComponentEventListener<DatesSetEvent> listener) Adds dates set listener. The event is fired after the calendar’s date range has been initially set or changed in some way and the DOM of component has been updated.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
- See Also:
-
addMoreLinkClickListener
public com.vaadin.flow.shared.Registration addMoreLinkClickListener(com.vaadin.flow.component.ComponentEventListener<MoreLinkClickEvent> listener) Adds a "more" link click listener. When listener is added, theJmixFullCalendar.setMoreLinkCalendarDisplayMode(CalendarDisplayMode)
value will be ignored.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addEventClickListener
public com.vaadin.flow.shared.Registration addEventClickListener(com.vaadin.flow.component.ComponentEventListener<EventClickEvent> listener) Adds an event click listener.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addEventMouseEnterListener
public com.vaadin.flow.shared.Registration addEventMouseEnterListener(com.vaadin.flow.component.ComponentEventListener<EventMouseEnterEvent> listener) Adds a listener that is invoked when the user mouses over a calendar event.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addEventMouseLeaveListener
public com.vaadin.flow.shared.Registration addEventMouseLeaveListener(com.vaadin.flow.component.ComponentEventListener<EventMouseLeaveEvent> listener) Adds a listener that is invoked when the user mouses out of a calendar event.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addEventDropListener
public com.vaadin.flow.shared.Registration addEventDropListener(com.vaadin.flow.component.ComponentEventListener<EventDropEvent> listener) Adds a listener that is invoked when dragging stops and the event has moved to a different day/time cell.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addEventResizeListener
public com.vaadin.flow.shared.Registration addEventResizeListener(com.vaadin.flow.component.ComponentEventListener<EventResizeEvent> listener) Adds a listener that is invoked when resizing stops and the calendar event has changed in duration.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addDateClickListener
public com.vaadin.flow.shared.Registration addDateClickListener(com.vaadin.flow.component.ComponentEventListener<DateClickEvent> listener) Adds a listener that is invoked when day cell or time cell is clicked.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addSelectListener
public com.vaadin.flow.shared.Registration addSelectListener(com.vaadin.flow.component.ComponentEventListener<SelectEvent> listener) Adds a listener that is invoked when a date/time selection is made.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
-
addUnselectListener
public com.vaadin.flow.shared.Registration addUnselectListener(com.vaadin.flow.component.ComponentEventListener<UnselectEvent> listener) Adds a listener that is invoked when the current selection is cleared.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener added to a component
- See Also:
-
getMoreLinkClassNamesGenerator
- Returns:
- a class names generator for "more" link or
null
if not set
-
setMoreLinkClassNamesGenerator
public void setMoreLinkClassNamesGenerator(@Nullable Function<MoreLinkClassNamesContext, List<String>> classNamesGenerator) Sets a class names generator for "more" link.Note, generator takes precedence over a
JmixFullCalendar.setMoreLinkClassNames(List)
and other "add class name" methods.- Parameters:
classNamesGenerator
- the generator to set
-
getDayHeaderClassNamesGenerator
@Nullable public Function<DayHeaderClassNamesContext,List<String>> getDayHeaderClassNamesGenerator()- Returns:
- a class names generator for day headers or
null
if not set
-
setDayHeaderClassNamesGenerator
public void setDayHeaderClassNamesGenerator(@Nullable Function<DayHeaderClassNamesContext, List<String>> classNamesGenerator) Sets a class names generator for day headers. The day header is a cell that shows day of week and date in some display modes.- Parameters:
classNamesGenerator
- the generator to set
-
getDayCellClassNamesGenerator
- Returns:
- a day cell class names generator or
null
if not set
-
setDayCellClassNamesGenerator
public void setDayCellClassNamesGenerator(@Nullable Function<DayCellClassNamesContext, List<String>> dayCellClassNamesGenerator) Sets a day cell class names generator. The day cell appears in day-grid and time-grid display modes as an all-day cell.- Parameters:
dayCellClassNamesGenerator
- the generator to set
-
getSlotLabelClassNamesGenerator
@Nullable public Function<SlotLabelClassNamesContext,List<String>> getSlotLabelClassNamesGenerator()- Returns:
- slot label class names generator or
null
if not set
-
setSlotLabelClassNamesGenerator
public void setSlotLabelClassNamesGenerator(@Nullable Function<SlotLabelClassNamesContext, List<String>> slotLabelClassNamesGenerator) Sets a slot label class-names generator. The slot label appears in time-grid display modes. It is a cell with time label.- Parameters:
slotLabelClassNamesGenerator
- the generator to set
-
getNowIndicatorClassNamesGenerator
@Nullable public Function<NowIndicatorClassNamesContext,List<String>> getNowIndicatorClassNamesGenerator()- Returns:
- a now-indicator class names generator or
null
if not set
-
setNowIndicatorClassNamesGenerator
public void setNowIndicatorClassNamesGenerator(@Nullable Function<NowIndicatorClassNamesContext, List<String>> nowIndicatorClassNamesGenerator) Sets a now-indicator class names generator. The now-indicator consists of two parts: the line and the axis.The now-indicator can be enabled by
JmixFullCalendar.setNowIndicatorVisible(boolean)
.- Parameters:
nowIndicatorClassNamesGenerator
- the generator to set
-
getDayCellBottomTextGenerator
- Returns:
- bottom text generator for day cells or
null
if not set
-
setDayCellBottomTextGenerator
public void setDayCellBottomTextGenerator(@Nullable Function<DayCellBottomTextContext, String> dayCellBottomTextGenerator) Sets bottom text generator for day cells. It applies only forCalendarDisplayModes.DAY_GRID_MONTH
andCalendarDisplayModes.DAY_GRID_YEAR
.Note sometimes generated text can be overlapped by events, so it is recommended to limit visible events count (e.g.
JmixFullCalendar.setDayMaxEvents(Integer)
, etc.).- Parameters:
dayCellBottomTextGenerator
- the generator to set
-
getDayCellBottomTextClassNamesGenerator
@Nullable public Function<DayCellBottomTextClassNamesContext,List<String>> getDayCellBottomTextClassNamesGenerator()- Returns:
- bottom text class names generator or
null
if not set
-
setDayCellBottomTextClassNamesGenerator
public void setDayCellBottomTextClassNamesGenerator(@Nullable Function<DayCellBottomTextClassNamesContext, List<String>> dayCellBottomTextClassNamesGenerator) Sets bottom text class names generator. Note, the generator will be invoked only if cell's bottom text is not null.- Parameters:
dayCellBottomTextClassNamesGenerator
- the generator to set- See Also:
-
createOptions
- Overrides:
createOptions
in classJmixFullCalendar
-
createSerializer
- Overrides:
createSerializer
in classJmixFullCalendar
-
getOptions
-
getSerializer
-
setupLocalization
protected void setupLocalization() -
setI18nInternal
-
fetchCalendarItems
- Overrides:
fetchCalendarItems
in classJmixFullCalendar
-
addDataProviderInternal
-
onItemSetChangeListener
-
requestIncrementalDataUpdate
protected void requestIncrementalDataUpdate() -
performIncrementalDataUpdate
protected void performIncrementalDataUpdate(com.vaadin.flow.internal.ExecutionContext context) -
requestUpdateItemDataProvider
-
performUpdateItemDataProvider
-
onDatesSet
- Overrides:
onDatesSet
in classJmixFullCalendar
-
onMoreLinkClick
- Overrides:
onMoreLinkClick
in classJmixFullCalendar
-
onEventClick
- Overrides:
onEventClick
in classJmixFullCalendar
-
onEventMouseEnter
- Overrides:
onEventMouseEnter
in classJmixFullCalendar
-
onEventMouseLeave
- Overrides:
onEventMouseLeave
in classJmixFullCalendar
-
onEventDrop
- Overrides:
onEventDrop
in classJmixFullCalendar
-
onEventResize
- Overrides:
onEventResize
in classJmixFullCalendar
-
onDateClick
- Overrides:
onDateClick
in classJmixFullCalendar
-
onSelect
- Overrides:
onSelect
in classJmixFullCalendar
-
onUnselect
- Overrides:
onUnselect
in classJmixFullCalendar
-
getMoreLinkClassNames
protected elemental.json.JsonArray getMoreLinkClassNames(elemental.json.JsonObject jsonContext) - Overrides:
getMoreLinkClassNames
in classJmixFullCalendar
-
getDayHeaderClassNames
protected elemental.json.JsonArray getDayHeaderClassNames(elemental.json.JsonObject jsonContext) - Overrides:
getDayHeaderClassNames
in classJmixFullCalendar
-
getDayCellClassNames
protected elemental.json.JsonArray getDayCellClassNames(elemental.json.JsonObject jsonContext) - Overrides:
getDayCellClassNames
in classJmixFullCalendar
-
getSlotLabelClassNames
protected elemental.json.JsonArray getSlotLabelClassNames(elemental.json.JsonObject jsonContext) - Overrides:
getSlotLabelClassNames
in classJmixFullCalendar
-
getNowIndicatorClassNames
protected elemental.json.JsonArray getNowIndicatorClassNames(elemental.json.JsonObject jsonContext) - Overrides:
getNowIndicatorClassNames
in classJmixFullCalendar
-
getDayCellBottomTextInfo
protected elemental.json.JsonObject getDayCellBottomTextInfo(elemental.json.JsonObject jsonContext) - Overrides:
getDayCellBottomTextInfo
in classJmixFullCalendar
-
createDataProviderManager
protected ItemsDataProviderManager createDataProviderManager(ItemsCalendarDataProvider dataProvider) -
createCallbackDataProviderManager
protected CallbackDataProviderManager createCallbackDataProviderManager(CallbackCalendarDataProvider dataProvider) -
initTimeZone
protected void initTimeZone() -
toLocalDateTime
Returns date-time as is from client without transformation- Parameters:
isoDateTime
- string to parse- Returns:
- local date-time
-
transformToLocalDateTime
Returns transformed date-time from component's time zone to system default (TimeZone.getDefault()
).- Parameters:
isoDateTime
- string to parse- Returns:
- transformed local date-time
-
getComponentZoneId
-
getComponentTimeZone
-
getDataProviderManager
-
getRelatedEvents
Returns all related calendar events, even if they are from different data providers.Note, it applies changes to
CalendarEvent
.- Parameters:
relatedEvents
- list of raw related events- Returns:
- related calendar events
-
getRelatedDataProviderContexts
protected List<AbstractEventMoveEvent.RelatedDataProviderContext> getRelatedDataProviderContexts(List<DomCalendarEvent> relatedEvents) -
getCalendarEvent
protected CalendarEvent getCalendarEvent(DomCalendarEvent clientEvent, AbstractDataProviderManager dataProviderManager) -
applyChangesToCalendarEvent
protected void applyChangesToCalendarEvent(CalendarEvent calendarEvent, DomCalendarEvent clientEvent) -
createMoreLinkDataProviderContexts
protected List<MoreLinkClickEvent.DataProviderContext> createMoreLinkDataProviderContexts(DomMoreLinkClick context) -
createMoreLinkDataProviderContext
@Nullable protected MoreLinkClickEvent.DataProviderContext createMoreLinkDataProviderContext(AbstractDataProviderManager dataProviderManager, List<DomCalendarEvent> allEvents, List<DomCalendarEvent> hiddenEvents) -
toCalendarEvents
-
toCalendarEvents
protected List<CalendarEvent> toCalendarEvents(AbstractDataProviderManager dataProviderManager, List<DomCalendarEvent> segments) -
createOldValues
-
createDelta
-
createDisplayModeInfo
-
createDefaultI18n
-
createCalendarLocalizedUnitNamesJson
protected elemental.json.JsonObject createCalendarLocalizedUnitNamesJson() -
getParsedByCommaMessage
-
getMessage
-
setupDayGridLocalizedFormats
protected void setupDayGridLocalizedFormats() -
setupTimeGridLocalizedFormats
protected void setupTimeGridLocalizedFormats() -
setupListLocalizedFormats
protected void setupListLocalizedFormats() -
setupMultiLocalizedFormats
protected void setupMultiLocalizedFormats() -
setupDefaultLocalizedFormats
protected void setupDefaultLocalizedFormats() -
getDisplayMode
Method is overridden to make it available fromFullCalendarUtils.getDisplayMode(FullCalendar, String)
.- Overrides:
getDisplayMode
in classJmixFullCalendar
- Parameters:
id
- display mode id- Returns:
- calendar display mode instance
-
addDataProvidersOnAttach
protected void addDataProvidersOnAttach()- Overrides:
addDataProvidersOnAttach
in classJmixFullCalendar
-