MiG InfoCom AB
When you write your own importer of activities, or create a factory that
creates them you should implement ActivityIOPlugin. It
contains some informative methods where you can provide an ID and
a human readable name.
Resolving version conflicts
The reason you have to implement ActivityIOPlugin is so that
every Activity has a parent that can take care of its life cycle.
When you add the Activity to the depository you also have to
provide a reference to the plugin that read or created the Activity.
If there already exists an Activity with the same ID as the one
you are adding a version conflict will arise, no matter if they actually
are equal, that is for the ActivityResolver so decide.
If no ActivityResolver is installed for the the
ActivityDepository, the Activity with the most recent
modification date will be retained and the other one discarded. If
another synchronization algorithm is to be used, the
ActivityResolver can easily be replaced for a more advanced
or better suited one.
Laying out the ActivityViews
Point to time to pixels
How to map a certain date range to some bounds in a pixel based
date area is not trivial one. MiG Calendar has a very flexible solution
and a very powerful default implementation that should be sufficient
for almost any need.
More than one layout simultaneously
The DefaultDateArea has support for multiple layouts at the
same time. The layouts are ordered after how keen they are to layout
a certain ActivityView. The installed layout that reports the
highest integer value for a ActivityView will, during the layout
run, be asked to layout that view.
During the layout run the layout that is first (layouts are sortable and
sorted in their natural order, which is changeable) in line will be asked
to layout its views. It does so and returns all rectangles that are now
'occupied'. The next layout will have to, or should, consider these
occupied rectangles as forbidden areas and have to layout around
them.
More then one level
MiG Calendar Tutorial Page 14 / 24
Comentarios a estos manuales