MiG InfoCom MiG Calendar JavaBeans Guide User Manual

Page 38

Advertising
background image

MiG InfoCom AB

handles the optional scroll bars.

Since the DateAreaBean is a DateAreaContainer you will
normally always have an instance of this class directly
accessible.

DefaultDateArea – The component directly responsible for
managing the grid where everything is painted relative to
(e.g. the activities). Everything that is painted in the date
area (and headers b.t.w.) are drawn using layered
Decorators. For instance the grid and the activities are both
painted with Decorators. More on those below.

You can get a hold of the date area by calling getDateArea()
on a DateAreaContainer (which includes DateAreaBean).

DateGrid – Contains the pixel to dates mapping. How a pixel
(x, y) corresponds to a date or a date range and vice versa.
There are a lot of convenience methods in the DateGrid to
convert between pixels and dates. The DateGrid contains the
date structure of the date area. The date grid’s structure is
immutable which means that it will be recreated if that
structure changes, for instance if the visual date range or
primary dimension changes.

You get the DateGrid by calling getDateGrid() on a
DefaultDateArea. Note that since it might be recreated at
any time it should not be cached in any way for later use.
Also see the interface DateGridContainer.

ActivityDepository – Holds all handled (also called
broked”) activities. This means all the activities that the
component should be able to access. There can be many
depositories but a date area can only use one as a time. The
different depositories are accessed with a context. null is
the default context.

You normally move activities in and out of the depository and
to/from a backing store (e.g. a database).

You get an ActivityDepository by calling the static method
ActivityDepository.getInstance() or
ActivityDepository.getInstance(String context).

CategoryDepository – Resembles the ActivityDepository
but contains an application wide category tree with a single
Category root.

Get the CategoryDepository root by calling the static

MiG Calendar JavaBeans Guide

Page 38 / 45

Advertising