beautypg.com

MiG InfoCom MiG Calendar Getting Started Guide User Manual

Page 14

background image

MiG InfoCom AB

They are drawn with a

Decorator

like everything else but

only the layer index in which the activities are drawn can be

changed with the

CalendarTheme

. The size and position

can be changed with the theme since those are properties of

the

ActivityLayout

system and not how if looks.

See Customizing how activities look and feel under the

manual section below for an explanation on how to change

the look of an

ActivityView

.

Customizing Activities Size and Position
There are currently three different

ActivityLayout

s

delivered with the component;

FlexGridLayout

,

HideLayout

and

TimeBoundsLayout

. They can all be

customized to great extent using the theme.
Under the

CalendarTheme.KEY_LAYOUTS_AUTO_INSTALL

list key you can add your own layouts if needed. With the

Theme Editor you can configure and reorder the built in

layouts. See the

Theme Editor Tutorial

for more information on

how to do this.
To set a layout with a little more space around the activity

than default add these rows just before you create the

container:

TimeBoundsLayout layout = new TimeBoundsLayout(

new AtFixed(15), new AtStart(15), new AtEnd(-15), 15);

theme.removeAllFromList(CalendarTheme.KEY_LAYOUTS_AUTO_INSTALL);
theme.addToList(CalendarTheme.KEY_LAYOUTS_AUTO_INSTALL, layout);

MiG Calendar Getting Started Guide

Page 14 / 31