MiG InfoCom MiG Calendar JavaBeans Guide User Manual

Page 40

Advertising
background image

MiG InfoCom AB

are sub classes of AbstractActivity. The changed
Activity is set at the source in the generated event.

Add a PropertyChangeListener to the relevant
activity depository. It will receive events if any of the
activities in the depository changes. It will also fire
events when a Subscription to the activity
depository changes. See
ActivityDepository.addPropertyChangeListener(
..).

Add an ActivityDragResizeListener to the
DefaultDateArea. It will notify listeners when the
move/resize of the activity is considered done. This
might be necessary to do since the normal listening
on the activities themselves gives no clue of when the
move/resize is actually done or if the change is just
one in many during a drag/resize.

Add an AcitivityMoveListener to the
DefaultDateArea to monitor all moves/resizes before
they are set to the activity with an option to change
the resulting date range. This can be used to enforce
all kinds of rules on moves/resizes of activities.

Add an InteractionListener to the
DefaultDateArea to track events that is graphically
happening to the activity. Those might be selection,
mouse over or start of a resize.

Add a GridListener to the DefaultDateArea to get
notified when the structure of the DateGrid changes
or rather when it is recreated.

Add a DateChangeListener to the DefaultDateArea
to track date range selection, mouse over and mouse
press
events in the date area.

There are a lot more listeners that can be added trough out
the component framework. Use the API JavaDoc to see what
listeners can be added and where.

Setting Activity Look Dynamically

There are many ways to do this. One is to create your own
ActivityViewRenderer and set that on a DefaultDateArea.
Then you have total control but have to do everything
manually, including mouse handling support and such.

MiG Calendar JavaBeans Guide

Page 40 / 45

Advertising