Interface ICalendarListener
- All Superinterfaces:
org.apache.wicket.util.io.IClusterable,Serializable
- All Known Implementing Classes:
Calendar,CalendarAdapter
public interface ICalendarListener
extends org.apache.wicket.util.io.IClusterable
Event listener shared by the
Calendar widget and the CalendarBehavior- Author:
- Sebastien Briquet - sebfz1
-
Method Summary
Modifier and TypeMethodDescriptionGets the javascript statement which will be executed beforeonEventDrop(AjaxRequestTarget, String, long, boolean)event is triggered
A common use case is to call therevertFunccallback to cancel the event.Gets the javascript statement which will be executed beforeonEventResize(AjaxRequestTarget, String, long)event is triggered
A common use case is to call therevertFunccallback to cancel the event.booleanIndicates whether a day can be clicked.
If true, theonDayClick(AjaxRequestTarget, CalendarView, LocalDateTime, boolean)event will be triggered
Note:truewill enable the global 'editable' option totrue.booleanIndicates whether an event can be clicked.
If true, theonEventClick(AjaxRequestTarget, CalendarView, String)event will be triggered
Note:truewill enable the global 'editable' option totrue.booleanIndicates whether the event can be dragged & dropped.booleanIndicates whether the event can be resized.booleanIndicates whether theonObjectDrop(AjaxRequestTarget, String, LocalDateTime, boolean)event will be triggeredbooleanIndicates whether a cell can be selected.
If true, theonSelect(AjaxRequestTarget, CalendarView, LocalDateTime, LocalDateTime, boolean)event will be triggeredbooleanIndicates whether theonViewRender(AjaxRequestTarget, CalendarView, LocalDate, LocalDate)event will be triggeredvoidonDayClick(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, LocalDateTime date, boolean allDay) Triggered when a calendar day is clicked
isDayClickEnabled()should return true for this event to be triggered.voidonEventClick(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, String eventId) Triggered when an event is clicked.
isEventClickEnabled()should return true for this event to be triggered.voidonEventDrop(org.apache.wicket.ajax.AjaxRequestTarget target, String eventId, long delta, boolean allDay) Triggered when an event is dropped (after being dragged).
isEventDropEnabled()should return true for this event to be triggered.voidonEventResize(org.apache.wicket.ajax.AjaxRequestTarget target, String eventId, long delta) Triggered when an event is dropped (after being dragged).
isEventResizeEnabled()should return true for this event to be triggered.voidonObjectDrop(org.apache.wicket.ajax.AjaxRequestTarget target, String title, LocalDateTime date, boolean allDay) Triggered when an event-object is dropped.
isObjectDropEnabled()should return true for this event to be triggered.voidonSelect(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, LocalDateTime start, LocalDateTime end, boolean allDay) Triggered when an cell is selected.
isSelectable()should return true for this event to be triggered.voidonViewRender(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, LocalDate start, LocalDate end) Triggered when the calendar loads and every time a different date-range is displayed.
isViewRenderEnabled()should return true for this event to be triggered.
-
Method Details
-
isSelectable
boolean isSelectable()Indicates whether a cell can be selected.
If true, theonSelect(AjaxRequestTarget, CalendarView, LocalDateTime, LocalDateTime, boolean)event will be triggered- Returns:
- false by default
-
isDayClickEnabled
boolean isDayClickEnabled()Indicates whether a day can be clicked.
If true, theonDayClick(AjaxRequestTarget, CalendarView, LocalDateTime, boolean)event will be triggered
Note:truewill enable the global 'editable' option totrue.- Returns:
- false by default
- See Also:
-
isEventClickEnabled
boolean isEventClickEnabled()Indicates whether an event can be clicked.
If true, theonEventClick(AjaxRequestTarget, CalendarView, String)event will be triggered
Note:truewill enable the global 'editable' option totrue.- Returns:
- false by default
- See Also:
-
isObjectDropEnabled
boolean isObjectDropEnabled()Indicates whether theonObjectDrop(AjaxRequestTarget, String, LocalDateTime, boolean)event will be triggered- Returns:
- false by default
-
isEventDropEnabled
boolean isEventDropEnabled()Indicates whether the event can be dragged & dropped. If true, theonEventDrop(AjaxRequestTarget, String, long, boolean)event will be triggered- Returns:
- false by default
-
isEventResizeEnabled
boolean isEventResizeEnabled()Indicates whether the event can be resized. If true, theonEventResize(AjaxRequestTarget, String, long)event will be triggered- Returns:
- false by default
-
isViewRenderEnabled
boolean isViewRenderEnabled()Indicates whether theonViewRender(AjaxRequestTarget, CalendarView, LocalDate, LocalDate)event will be triggered- Returns:
- false by default
-
getEventDropPrecondition
CharSequence getEventDropPrecondition()Gets the javascript statement which will be executed beforeonEventDrop(AjaxRequestTarget, String, long, boolean)event is triggered
A common use case is to call therevertFunccallback to cancel the event.- Returns:
- the javascript statement, empty string by default
- See Also:
-
getEventResizePrecondition
CharSequence getEventResizePrecondition()Gets the javascript statement which will be executed beforeonEventResize(AjaxRequestTarget, String, long)event is triggered
A common use case is to call therevertFunccallback to cancel the event.- Returns:
- the javascript statement, empty string by default
- See Also:
-
onSelect
void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, LocalDateTime start, LocalDateTime end, boolean allDay) Triggered when an cell is selected.
isSelectable()should return true for this event to be triggered.- Parameters:
target- theAjaxRequestTargetview- the current calendar viewstart- the event startLocalDateTimeend- the event endLocalDateTimeallDay- the event all-day property
-
onDayClick
void onDayClick(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, LocalDateTime date, boolean allDay) Triggered when a calendar day is clicked
isDayClickEnabled()should return true for this event to be triggered.- Parameters:
target- theAjaxRequestTargetview- the current calendar viewdate- the dayallDay- the event all-day property
-
onEventClick
void onEventClick(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, String eventId) Triggered when an event is clicked.
isEventClickEnabled()should return true for this event to be triggered.- Parameters:
target- theAjaxRequestTargetview- the current calendar vieweventId- theCalendarEventid
-
onEventDrop
void onEventDrop(org.apache.wicket.ajax.AjaxRequestTarget target, String eventId, long delta, boolean allDay) Triggered when an event is dropped (after being dragged).
isEventDropEnabled()should return true for this event to be triggered.- Parameters:
target- theAjaxRequestTargeteventId- theCalendarEventiddelta- the delta (time) with the original event dateallDay- the event all-day property
-
onEventResize
Triggered when an event is dropped (after being dragged).
isEventResizeEnabled()should return true for this event to be triggered.- Parameters:
target- theAjaxRequestTargeteventId- theCalendarEventiddelta- the delta (time) with the original event date
-
onObjectDrop
void onObjectDrop(org.apache.wicket.ajax.AjaxRequestTarget target, String title, LocalDateTime date, boolean allDay) Triggered when an event-object is dropped.
isObjectDropEnabled()should return true for this event to be triggered.- Parameters:
target- theAjaxRequestTargettitle- the titledate- the dayallDay- the event all-day property
-
onViewRender
void onViewRender(org.apache.wicket.ajax.AjaxRequestTarget target, CalendarView view, LocalDate start, LocalDate end) Triggered when the calendar loads and every time a different date-range is displayed.
isViewRenderEnabled()should return true for this event to be triggered.
-