MiG InfoCom MiG Calendar Getting Started Guide User Manual

Page 9

Advertising
background image

MiG InfoCom AB

The ThemeDateAreaContainer
To create a component and to show it is really easy. Just

create a

ThemeDateAreaContainer

and it will create and

use the default

CalendarTheme

settings to create

everything. The default settings are somewhat minimalistic

though, so it won't be very pretty. The

“myContext”

theme

context is just a key so we know how to get a handle to the

created theme later. The constructor will create a

Theme

of

the type

CalendarTheme

and register it in the

Themes

singleton class for us, using the provided context as the key.

ThemeDateAreaContainer container = new ThemeDateAreaContainer(“myContext”);

Visual Date Range
If you want to specify between which dates the date area

should be shown you change the visual range:

long startMillis = new GregorianCalendar(...).getTimeInMillis();
long endMillis = new GregorianCalendar(...).getTimeInMillis();

DateRange visibleRange = new DateRange(startMillis, endMillis, true, null, null);

container.getDateArea().setVisibleDateRange(visibleRange);

MiG Calendar Getting Started Guide

Page 9 / 31

Illustration 1 Default Theme settings

Advertising