Repeating appointments

Writing a calendar control is great fun; figuring out the algorithm of how to render multiple appointments on the same time, evolving the API, … The ‘I always wanted to do that’ is what makes a hobby project interesting. Of course the control is no where near as refined as the commercial alternative(s), and it most definitely could use a number of additional skins, but it looks pretty decent and -most importantly- works. 🙂

From an architectural point of view the Agenda control has one clear goal: render appointments. Nothing more, nothing less. The API expects a list of appointments to be rendered, given the time frame that the Agenda control’s currently active skin is displaying. It does not care where the appointments came from, if they are unique, pink, blue, or repeating. It just wants to know the raw meta data, so it can draw the appropriate areas and assign CSS to them.

But that is a fairly primary functionality for an Agenda, suited for programmers who own the domain entities and the application Agenda is embedded in. End users may expect some additional functionality, like notifications, or repeating appointments. And the latter is what David Bal is trying to add.

David chose to create the ICalendarAgenda control by extending Agenda and bolting on the repeating behavior. For this ICalendarAgenda requires a list of instances (vcomponents) for the different types that the iCalendar specification defines; event (vevent), to-do (vtodo), journal (vjournal). Based on these definitions actual appointments are generated and provided to Agenda.


ICalendarAgenda nicely shows how a core control can be extended with additional functionality. In the discussions we had, a lot of time was spent keeping this separation strict, so Agenda can focus on rendering without being obfuscated with repeating logic. It is a good choice of David to use a standard for basing the implementation on. I’m very pleased with how the work is coming along. Keep up the good work, David!

ICalendarAgenda currently is part of JFXtras Labs.

This Post Has 4 Comments

  1. tbeernot

    1. I’ve started work on a Month view, but have not yet finished it, and have no idea when it will be. Other side-projects require my attention right now.
    2. The week view does not have buttons for navigating the week, all it does it render a week. So you need to write them yourself and then on click modify the displayed date in the Agenda control. The week view will then pick up the corresponding week. Remember that the view is a hidden part of the control and should not be addressed directly. There a view switcher control for Agenda. A next/previous timeslot (week) add-on would be a nice idea to write.
    3. You tell me! Give it a shot, but it should work exactly the same.

  2. Vandana Chadha

    Using The Agenda control to show appointments, and it a great control. But I am having some problems, and need help.

    1. I need to show a month view? Is it available? Trying the below gives compile error, though the same syntax is ok for AgendaDaySkin. Pls let me know if the MonthSkin is available and how to use it?

    2. In a week view, how do I get the buttons for navigating the previous and next weeks?

    3. Does this control run well on Mac?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.