The themed approach – MiG InfoCom MiG Calendar Getting Started Guide User Manual
Page 8
![background image](https://www.manualsdir.com/files/798671/content/doc008.png)
MiG InfoCom AB
grid properties and a lot of other stuff manually. It is not as
daunting as it may sound but a quite thorough read through
of the
DefaultDateArea
and
DateAreaContainer
javadocs is a definitely recommended.
All properties that can be set and changed for the
DefaultDateArea
is outside the context of this getting
started guide, for more information see the
API JavaDoc
.
Themed Approach
Note! From v6.0 of the component this approach isn't
recommended! Please use the JavaBeans approach. The
section about themes below is still worth the reading as the
base component is still the same and concepts translated to
the other approaches.
The advantage of the themed version is that a lot of
configuration is taken care of with the default settings for the
CalendarTheme
. The theme can also be changed, preferably
before the component is created, in one place and that will
migrate to the correct part automatically. For instance you
can set the background for a
Header
without knowing
anything about how to get a hold of, or even create and
inject, the header. The only thing you need is the correct key,
and the keys are thoroughly documented, which makes
finding it easy.
The downside is that the simplicity to use it hampers the
control somewhat. Since the theme classes (e.g.
ThemeDateAreaContainer
and
ThemeDateArea)
creates
all headers, grid lines specifications, grid segments etc, you
will have a harder time tweaking the creation of them than
you might with the manual versions. Normally this is not a
problem, the theme has so many different properties that
you will probably not even use them all, but there are
situations where you might need more control.
It should be noted that it is still possible to change and tweak
the themed components, especially if auto update for the
Theme
is turned off, but what should be changed and when is
a bit less clear.
The themed versions of the classes are actually subclasses of
the manual ones. They read from the
Theme
and set and
reset properties on its base class when creating it, and
possibly for every change depending on if the theme is set to
auto update changes or not.
The Themed Approach
MiG Calendar Getting Started Guide
Page 8 / 31