Even more advanced topics – MiG InfoCom MiG Calendar JavaBeans Guide User Manual

Page 44

Advertising
background image

MiG InfoCom AB

}
public void gridChanged(PropertyChangeEvent e) {} // Not interested

public void dispose() {} // Nothing to dispose of

};

dateArea.addDecorator(decorator);

Note that we subclass AbstractGridDecorator that has
support for all boiler plate functionality. Even though the
code above is of more a “core” approach it is really simple.
Mixing core flexibility with JavaBeans is no problem.

Tool Tips for Activities

Since activities all are different it’s not as easy as just setting
the tooltip text on the date area to show an activity’s mouse
over tooltip. This is why the tooltip framework has been
made very flexible and dynamic. To add tooltip over activity
functionality you create a class that extends
ToolTipProvider. There is a singe method that has to be
implemented, for the other methods the Swing defaults will
be used. There is even sample code for this method in the
API JavaDoc for the ToolTipProvider class.

It is possible to create tooltips that follow the mouse
movement and it is very easy to set properties on the tooltip.
This includes font, background and foreground color and
border.

When you have created this class you set it on the
DefaultDateArea with the method setToolTipProvider(…).

Even More Advanced Topics

The MiG Calendar framework is made from scratch to be very
flexible and extensible. It is done much like the Swing
framework. It is almost always possible to swap in totally
customized functionality, sometimes at many levels, and it is
always possible to tweak the built in functionality.

How to add this advanced functionality is not covered in this
guide. Refer to the other guides installed with the
component. They all refer to the core component which is
more code-centric.

Mixing low level core component code with JavaBeans

MiG Calendar JavaBeans Guide

Page 44 / 45

Advertising