MiG InfoCom MiG Calendar InfoCom AB User Manual
Page 8
© 2007 MiG InfoCom AB
or for a specific DefaultAShapeProvider instance:
provider.setShape(
Then you just set the paintContext for the activities to match one of the
registered contexts and the renderer will use the appropriate shape to
paint it. null is the default paintContext used for the default shape.
activity.setPaintContext(
A much more advanced solution, but one that give you total control, is to
write new Interactors and InteractionBrokers and set them on the
RootAShape in the render stage. That is not a route we recommend for
simpler customizations though.
From v6.0 you can also install mouse listeners on the AShapes. See the
AShape Developers Guide for how to do this. It makes interactions with
the mouse much simpler.
Recurrence Support
MiG Calendar supports all interesting aspects of the iCalendar (RFC 2445)
specification which means that you can make just about any recurrence
rule known. Recurrences is a tricky thing though, especially if complex
recurrences should be modeled. To learn how to model a specific
recurrence you need to read RFC 2445, or a tutorial about it, as that is
outside the scope of the MiG Calendar documentation.
All classes below is in the
com.miginfocom.calendar.activity.recurrence package.
The base interface is Recurrence but you will normally use the
RecurrenceRule class (RFC 2445 RRULE) as the starting point. On it you
can for instance set the frequency and interval. You can also add
exceptions/inclusions using a ByXXXRule objects (e.g. BYDAY or BYWEEK)
and set one or many specific recurrence instances (BYSETPOS) and other
relevant values on that class.
You can even combine recurrences in CompositeRecurrence to make one
set so the options are even greater than outlined in RFC 2445.
The DTSTART, DTEND and TimeZone information is taken from the query
DateRange object sent in when getting the recurrence set. If you set a
recurrence on an Activity, which is the normal usage, that information it
taken from the base date range of the Activity.
How to create a recurrence for "last work day in every month":