Adding a date picker component – MiG InfoCom MiG Calendar JavaBeans Guide User Manual

Page 35

Advertising
background image

MiG InfoCom AB

these types of properties works. Basically they define a
rectangle relative to another rectangle in a very flexible way.
For instance docking a rectangle in another or aligning it in
some way.

Having translucent (see through) colors for the activities is
usually a nice effect. Have in mind though that older
computers, especially with older graphics cards, render
translucent primitives pretty slowly. This is especially true
under other operating systems than Windows and if there are
old or buggy drivers installed. Same thing but to a slightly
lesser extent is true for anti-aliased primitives (e.g. text and
outline).

This bean is using the same AShape definition configured in
different ways. The AShape framework can do so much more
though, it is like a mini SVG (Scalable Vector Graphics)
component optimized for fast graphics in Java. For
information on how to create a completely custom AShape
see the

AShape Developers Guide

.

The rest of the properties for ActivityAShapeBean are pretty
straight forward and will not be reiterated here. For more info
on these properties please look at the API JavaDoc for the
bean.

Sub Shapes

From v6.0 you have the option to add sub shapes to the
configured AShape. This means that it is simple to add
support for icons or custom graphics. You do this by manually
creating the AShape and add it to the ActivityAShape object
through the addSubShape(AShape) method. You should
probably make room for the sub shape by changing the
PlaceRect for the title and text so they won't overlap with
the added sub shape. An example on how to do this is
included as an example netBeans project (BeanDemo).

Adding a Date Picker Component

The DatePickerBean is a component that can be used to
create a very flexible date picker that looks much like a
combo box. It can optionally contain forward and backward
buttons and/or a "show today" button.

MiG Calendar JavaBeans Guide

Page 35 / 45

Advertising