The grid and its gridrows – MiG InfoCom MiG Calendar Tutorial User Manual

Page 10

Advertising
background image

MiG InfoCom AB

Manage a

DateGrid

object that contains the date to pixel

translations. The DateGrid object will be recreated when needed
and the DateArea is maintaining the information that should be
persistent, such as the primary dimension and selectable range.

Managing the layout and paint process of everything that is visible
on the date area. This is done thorough installable

Decorator

s.

There are decorators for painting the grid, activities, cell labels,
selection rubber band rectangle and so on. In all some 15 different
types of decorators is delivered with MiG Calendar.

Manage a subscription of the activities that should be shown in the

DateArea

. This includes checking for updates and taking the

appropriate action when it comes to the visual part.

The Grid and its GridRows

To map a point in time to a specific position on the screen a

DateGrid

object is used. It doesn't matter if time progresses

horizontally or vertically, the same grid class is used. The primary and
secondary dimension (I.e. if time progresses horizontally and wraps
vertically, like text, or the other way around) is a property of the grid
object.

Grid and DateGrid
A

Grid

, which is the base class for

DateGrid

and contains the

actual cell handling methods, is always square (x * y).

DateGrid

adds the functionality to map a point in time to a certain position within
the

Grid

.

GridRows
A

GridRow

contains information about one row, or grid line, in the

Grid. It can be either horizontal or vertical, though it doesn't contain
that information itself. The size and position of every row and grid line,
in both dimensions, is stored in these

GridRow

s. The grid's rows can

be extremely flexibly sized. They can be absolute (pixels) or relative
(percentage of bounds).

GridSegments

GridSegment

s are used to describe the size attributes for one or a

group of rows. Remember that rows can be both horizontal or vertical.
A

GridSegment

can for instance describe something like this: 'Five

rows with a minimum size of 10 pixels, max 25 pixels but preferably
20% of the total size (weighted)'.

MiG Calendar Tutorial

Page 10 / 24

Advertising