Customizing how activities look and feel – MiG InfoCom MiG Calendar Getting Started Guide User Manual

Page 25

Advertising
background image

MiG InfoCom AB

Customizing how Activities Look and Feel

The default installed

Decorator

that paints the

ActivityView

s uses the in the

DateArea

specified

ActivityViewRenderer

(which is an interface). That

renderer can easily be exchanged for something completely

different, but it is a

ShapeRenderer

by default.

You basically have two choices if you want to customize how

the activities are painted:
1. Provide a custom

AShape

that looks like you want. This is

the preferred choice for almost any use case.

AShape

s

have build in support for mouse and key event handling

and

DefaultDateArea

will support that. How to get the

ShapeRenderer

to use your new

AShape

will be shown

later.

2. Write your own

ActivityViewRenderer

. This is very

simple to do, but it can be hard to enable user interaction

with the rendered views since it has to be done manually.

Provide your own AShape
Creating an

AShape

that works and looks good is easy.

Creating one that look equally good in all sizes and aspect

rations is a bit harder since it usually includes setting

conditional visibility on some parts and size/position

MiG Calendar Getting Started Guide

Page 25 / 31

Illustration 14: Date area with category filter rows and a Category

Header

Advertising