Class FullCalendarSettings.Builder
- Enclosing class:
FullCalendarSettings
-
Method Summary
Modifier and TypeMethodDescriptionactionFormSelector(String actionFormSelector) Sets a jQuery selector used to find the form serialized for action JSP calls.actionParam(String name, Object value) Adds a static parameter sent to action JSP calls.actionParams(Map<String, Object> actionParams) Adds static parameters sent to action JSP calls.actionsJsp(String actionsJsp) Sets the module action JSP used by the component.additionalOption(String name, Object value) Adds a raw FullCalendar option not explicitly wrapped by this API.additionalOptions(Map<String, Object> options) Adds raw FullCalendar options not explicitly wrapped by this API.allDayDefault(boolean allDayDefault) Sets whether newly created events are all-day by default.build()Builds immutable calendar settings.businessHours(Object businessHours) Sets FullCalendar business hours.callbackEvent(String callbackName, String eventName) Overrides the DOM event name emitted for a FullCalendar callback.Removes all default items from the generic view dropdown.createEventJsp(String createEventJsp) Sets the JSP opened when users select a date/time range.displayHeaderRight(boolean displayHeaderRight) Shows or hides the right side of the generic calendar body header.editable(boolean editable) Enables or disables drag/drop and resize editing.eventDurationEditable(boolean eventDurationEditable) Enables or disables event duration editing by resize.eventLimit(Object eventLimit) Sets the FullCalendar dayMaxEvents option.eventResizableFromStart(boolean eventResizableFromStart) Enables or disables resizing events from their start edge.eventSource(Object eventSource) Adds a FullCalendar event source.eventSources(List<Object> eventSources) Adds FullCalendar event sources.eventStartEditable(boolean eventStartEditable) Enables or disables event start editing by drag and drop.Sets a FullCalendar events URL.eventTimeFormat(Object eventTimeFormat) Sets the time format displayed for events.fixedWeekCount(boolean fixedWeekCount) Sets whether month views always render six weeks.Sets the FullCalendar height option.Adds an icon to preload when the calendar is rendered.Adds icons to preload when the calendar is rendered.Adds icons to preload when the calendar is rendered.initialView(FullCalendarSettings.View initialView) Sets the initial view using a view provided by the core component.initialView(String initialView) Sets the FullCalendar initial view name.Sets the FullCalendar locale option, overriding the current navigation language.minHeight(int minHeight) Sets the minimum rendered calendar height.moreLinkText(String moreLinkText) Sets the text displayed after the hidden event count in a more link.Sets the core view opened when a day link is clicked.navLinkDayClickView(String viewName) Sets the view opened by the genericnavLinkDayClickhandler.navLinks(boolean navLinks) Enables or disables FullCalendar clickable day/week navigation links.nowIndicator(boolean nowIndicator) Enables or disables the current time indicator.Adds an option explicitly supported by the core calendar API.Adds several explicitly supported FullCalendar options.Removes the default month view from the generic view dropdown.Removes the default five days view from the generic view dropdown.Removes the default planning view from the generic view dropdown.Removes the default day view from the generic view dropdown.Removes the default week view from the generic view dropdown.Removes a core view from the generic view dropdown.removeView(String viewName) Removes an item from the generic view dropdown.renderingOption(String name, Object value) Adds a generic rendering option for the calendar JavaScript.selectable(boolean selectable) Enables or disables range selection in the calendar.showDatePicker(boolean showDatePicker) Enables or disables the generic date picker attached to the center date label.showToday(boolean showToday) Shows or hides the generic "today" button in the calendar body header.slotHeaderFormat(Object slotHeaderFormat) Sets the time format displayed in the time grid axis.slotMaxTime(String slotMaxTime) Sets the maximum time displayed by time grid views.slotMinHeight(int slotMinHeight) Sets the minimum pixel height of a time grid slot.slotMinTime(String slotMinTime) Sets the minimum time displayed by time grid views.Sets the FullCalendar timeZone option, overriding the member time zone when the builder was created with a member.Adds a core view to the generic view dropdown with its default i18n label.view(FullCalendarSettings.View view, String label) Adds a core view to the generic view dropdown.Adds an item to the generic view dropdown.wrapperCss(String wrapperCss) Adds CSS classes to the generated calendar wrapper.
-
Method Details
-
initialView
Sets the FullCalendar initial view name.This value is required but defaults to
FullCalendarSettings.View.DAY_GRID_MONTH. The legacytimeGridWeek5value is automatically converted toFullCalendarSettings.View.FIVE_DAYS.- Parameters:
initialView- FullCalendar view name, for exampledayGridMonth- Returns:
- this builder
-
initialView
Sets the initial view using a view provided by the core component.- Parameters:
initialView- core calendar view- Returns:
- this builder
-
option
Adds an option explicitly supported by the core calendar API.- Parameters:
name- FullCalendar option namevalue- FullCalendar option value- Returns:
- this builder
-
locale
Sets the FullCalendar locale option, overriding the current navigation language.- Parameters:
locale- FullCalendar locale code- Returns:
- this builder
-
timeZone
Sets the FullCalendar timeZone option, overriding the member time zone when the builder was created with a member.- Parameters:
timeZone- FullCalendar time zone value- Returns:
- this builder
-
height
Sets the FullCalendar height option.The default value is
FullCalendarSettings.DEFAULT_HEIGHT.- Parameters:
height- FullCalendar height value, such as"auto"or a number- Returns:
- this builder
-
minHeight
Sets the minimum rendered calendar height.The default value is
FullCalendarSettings.DEFAULT_MIN_HEIGHT.- Parameters:
minHeight- minimum height in CSS pixels- Returns:
- this builder
-
editable
Enables or disables drag/drop and resize editing. The default value isfalse.- Parameters:
editable- whether events can be edited by FullCalendar interactions- Returns:
- this builder
-
selectable
Enables or disables range selection in the calendar. The default value isfalse.- Parameters:
selectable- whether users can select a date/time range- Returns:
- this builder
-
nowIndicator
Enables or disables the current time indicator. The default value istrue.- Parameters:
nowIndicator- whether FullCalendar should display the current time indicator- Returns:
- this builder
-
eventLimit
Sets the FullCalendar dayMaxEvents option.This method keeps the historical
eventLimitbuilder name but maps it to the FullCalendar v7 option. The default value istrue, which lets FullCalendar calculate the number of visible events from the available cell height.- Parameters:
eventLimit- FullCalendar dayMaxEvents value- Returns:
- this builder
-
allDayDefault
Sets whether newly created events are all-day by default. The default value istrue.- Parameters:
allDayDefault- whether events without explicit times are all-day- Returns:
- this builder
-
eventDurationEditable
Enables or disables event duration editing by resize.- Parameters:
eventDurationEditable- whether event duration can be changed- Returns:
- this builder
-
eventResizableFromStart
Enables or disables resizing events from their start edge.- Parameters:
eventResizableFromStart- whether events can be resized from their start- Returns:
- this builder
-
eventStartEditable
Enables or disables event start editing by drag and drop.- Parameters:
eventStartEditable- whether event start can be changed- Returns:
- this builder
-
fixedWeekCount
Sets whether month views always render six weeks. The default value isfalse.- Parameters:
fixedWeekCount- whether month views keep a fixed week count- Returns:
- this builder
-
slotMinTime
Sets the minimum time displayed by time grid views. The default value is"00:00:00"so all hours remain available.- Parameters:
slotMinTime- FullCalendar duration string, for example"08:00:00"- Returns:
- this builder
-
slotMaxTime
Sets the maximum time displayed by time grid views. The default value is"24:00:00"so all hours remain available.- Parameters:
slotMaxTime- FullCalendar duration string, for example"19:00:00"- Returns:
- this builder
-
slotMinHeight
Sets the minimum pixel height of a time grid slot. The default value isFullCalendarSettings.DEFAULT_SLOT_MIN_HEIGHT.- Parameters:
slotMinHeight- minimum slot height in pixels- Returns:
- this builder
-
slotHeaderFormat
Sets the time format displayed in the time grid axis.- Parameters:
slotHeaderFormat- FullCalendar slotHeaderFormat native format object- Returns:
- this builder
-
moreLinkText
Sets the text displayed after the hidden event count in a more link.- Parameters:
moreLinkText- localized text appended after the event count- Returns:
- this builder
-
eventTimeFormat
Sets the time format displayed for events.- Parameters:
eventTimeFormat- FullCalendar eventTimeFormat native format object- Returns:
- this builder
-
businessHours
Sets FullCalendar business hours.- Parameters:
businessHours- boolean, object, or list accepted by FullCalendar- Returns:
- this builder
-
options
Adds several explicitly supported FullCalendar options.- Parameters:
options- option map merged into supported options- Returns:
- this builder
-
additionalOption
Adds a raw FullCalendar option not explicitly wrapped by this API.Additional options are merged after supported options and can therefore override them when needed by a module.
- Parameters:
name- FullCalendar option namevalue- FullCalendar option value- Returns:
- this builder
-
additionalOptions
Adds raw FullCalendar options not explicitly wrapped by this API.- Parameters:
options- option map merged into additional options- Returns:
- this builder
-
displayHeaderRight
Shows or hides the right side of the generic calendar body header. The default value istrue.- Parameters:
displayHeaderRight- whether the view dropdown should be displayed- Returns:
- this builder
-
showToday
Shows or hides the generic "today" button in the calendar body header.This only controls the generated toolbar button. External buttons can still trigger the same action with
data-j-fullcalendar-action="today". The default value istrue.- Parameters:
showToday- whether the generic today button should be displayed- Returns:
- this builder
-
showDatePicker
Enables or disables the generic date picker attached to the center date label.When disabled, the current date/range label is still displayed but no hidden date input and no picker-opening button are rendered. The default value is
true.- Parameters:
showDatePicker- whether the center date label should open a date picker- Returns:
- this builder
-
actionsJsp
Sets the module action JSP used by the component.The generic JavaScript calls this JSP for event list requests with
opEventList=trueand for event updates withopUpdateEvent=true.- Parameters:
actionsJsp- webapp-relative JSP path- Returns:
- this builder
-
createEventJsp
Sets the JSP opened when users select a date/time range.- Parameters:
createEventJsp- webapp-relative JSP path used to create an event- Returns:
- this builder
-
actionFormSelector
Sets a jQuery selector used to find the form serialized for action JSP calls.The selector can target the form itself or any element inside it. When the selected element is not a form, the generic JavaScript uses its
closest("form")ancestor.- Parameters:
actionFormSelector- jQuery selector targeting a form or an element inside a form- Returns:
- this builder
-
actionParam
Adds a static parameter sent to action JSP calls.- Parameters:
name- request parameter namevalue- request parameter value- Returns:
- this builder
-
actionParams
Adds static parameters sent to action JSP calls.- Parameters:
actionParams- request parameters- Returns:
- this builder
-
wrapperCss
Adds CSS classes to the generated calendar wrapper.- Parameters:
wrapperCss- additional CSS classes- Returns:
- this builder
-
eventsUrl
Sets a FullCalendar events URL.- Parameters:
eventsUrl- URL used by FullCalendar to load events- Returns:
- this builder
-
eventSource
Adds a FullCalendar event source.- Parameters:
eventSource- event source object accepted by FullCalendar- Returns:
- this builder
-
eventSources
Adds FullCalendar event sources.- Parameters:
eventSources- event source objects accepted by FullCalendar- Returns:
- this builder
-
callbackEvent
Overrides the DOM event name emitted for a FullCalendar callback.- Parameters:
callbackName- FullCalendar callback key, for exampleeventClickeventName- DOM event name emitted on the calendar wrapper- Returns:
- this builder
-
renderingOption
Adds a generic rendering option for the calendar JavaScript.- Parameters:
name- rendering option namevalue- rendering option value- Returns:
- this builder
-
clearViews
Removes all default items from the generic view dropdown.- Returns:
- this builder
-
view
Adds an item to the generic view dropdown.- Parameters:
viewName- FullCalendar view namelabel- label text or i18n property key- Returns:
- this builder
-
view
Adds a core view to the generic view dropdown with its default i18n label.- Parameters:
view- core calendar view- Returns:
- this builder
-
view
Adds a core view to the generic view dropdown.- Parameters:
view- core calendar viewlabel- label text or i18n property key- Returns:
- this builder
-
removeView
Removes an item from the generic view dropdown.- Parameters:
viewName- FullCalendar view name- Returns:
- this builder
-
removeView
Removes a core view from the generic view dropdown.- Parameters:
view- core calendar view- Returns:
- this builder
-
removeFiveDaysView
Removes the default five days view from the generic view dropdown.- Returns:
- this builder
-
removeDayGridMonthView
Removes the default month view from the generic view dropdown.- Returns:
- this builder
-
removeTimeGridWeekView
Removes the default week view from the generic view dropdown.- Returns:
- this builder
-
removeTimeGridDayView
Removes the default day view from the generic view dropdown.- Returns:
- this builder
-
removeListWeekView
Removes the default planning view from the generic view dropdown.- Returns:
- this builder
-
icon
Adds an icon to preload when the calendar is rendered.Use this for icons later returned by AJAX events so their SVG symbol is already present in the page.
- Parameters:
icon- Jalios icon key or icon source resolved byIconManager- Returns:
- this builder
-
icons
Adds icons to preload when the calendar is rendered.- Parameters:
icons- Jalios icon keys or icon sources- Returns:
- this builder
-
icons
Adds icons to preload when the calendar is rendered.- Parameters:
icons- Jalios icon keys or icon sources- Returns:
- this builder
-
build
Builds immutable calendar settings.- Returns:
- full calendar settings
- Throws:
IllegalStateException- if the required initial view is missing
-