/** * Fires event when a date was clicked in the calendar. Uses an existing * event from the event cache. * * @param index * The index of the event in the event cache. */ protected void fireEventClick(Integer index) { fireEvent(new EventClick(this, events.get(index))); }
/** * Fires event when a week was clicked in the calendar. * * @param week * The week that was clicked * @param year * The year of the week */ protected void fireWeekClick(int week, int year) { fireEvent(new WeekClick(this, week, year)); }
/** * Fires event when a date was clicked in the calendar. Creates a new event * for the date and passes it to the listener. * * @param date * The date and time that was clicked */ protected void fireDateClick(Date date) { fireEvent(new DateClickEvent(this, date)); }
/** * Fires an event when the user selecing moving forward/backward in the * calendar. * * @param forward * True if the calendar moved forward else backward is assumed. */ protected void fireNavigationEvent(boolean forward) { if (forward) { fireEvent(new ForwardEvent(this)); } else { fireEvent(new BackwardEvent(this)); } }
/** * Fires an event range selected event. The event is fired when a user * highlights an area in the calendar. The highlighted areas start and end * dates are returned as arguments. * * @param from * The start date and time of the highlighted area * @param to * The end date and time of the highlighted area * @param monthlyMode * Is the calendar in monthly mode */ protected void fireRangeSelect(Date from, Date to, boolean monthlyMode) { fireEvent(new RangeSelectEvent(this, from, to, monthlyMode)); }
/** * Fires an event move event to all server side move listeners. * * @param index * The index of the event in the events list * @param newFromDatetime * The changed from date time */ protected void fireEventMove(int index, Date newFromDatetime) { MoveEvent event = new MoveEvent(this, events.get(index), newFromDatetime); if (calendarEventProvider instanceof EventMoveHandler) { // Notify event provider if it is an event move handler ((EventMoveHandler) calendarEventProvider).eventMove(event); } // Notify event move handler attached by using the // setHandler(EventMoveHandler) method fireEvent(event); }
/** * Fires an event resize event. The event is fired when a user resizes the * event in the calendar causing the time range of the event to increase or * decrease. The new start and end times are returned as arguments to this * method. * * @param index * The index of the event in the event cache * @param startTime * The new start date and time of the event * @param endTime * The new end date and time of the event */ protected void fireEventResize(int index, Date startTime, Date endTime) { EventResize event = new EventResize(this, events.get(index), startTime, endTime); if (calendarEventProvider instanceof EventResizeHandler) { // Notify event provider if it is an event resize handler ((EventResizeHandler) calendarEventProvider).eventResize(event); } // Notify event resize handler attached by using the // setHandler(EventMoveHandler) method fireEvent(event); }