MiG InfoCom MiG Calendar AShape Developer Manual User Manual
Page 15
![background image](https://www.manualsdir.com/files/798676/content/doc015.png)
MiG InfoCom AB
TheJavaDocs of the difference classes will specify what it's
used for and what information it needs to do that. There are
also some static helper methods in
AShapeUtil
that helps
to create some if the more used interactions, such as setting
a
Cursor
for a mouse over event.
AShape Properties
All properties for an
AShape
are stored as a name/value pair
in a
Map
. This means that the
AShape
has very few
dedicated get/set method pairs, it has instead
PropertyKey
constants for accessing the properties (you can also have
your own key names of you want).
The downside if this is that type checking for the properties
isn't possible and the API is rather sparse.
The upside is that this is very extensible and powerful when
combined with overrides, as explained below. It is also very
simple to subclass and make your own
AShape
s since you
can use the already existing property constants or just
provide new ones, which is a one-liner.
Another positive thing is that it's automatically persistable to
XML through the API of the
AbstractAShape
and the beans
XML persistence technology introduced in Java SDK 1.4.
There are even convenience methods in
AShapeUtil
that
makes loading and saving of
AShape
s a one-liner. As long as
you store the
AShape
's properties with the provided
putAttibute(..)/getAttribute()
methods, they will be
possible to override (explained below) and automatically
persistable to XML.
Please see the API JavaDocs for information on the properties
and the expected types. Every
AShape
subclass has a list of
properties it uses. Most properties (as are defined directly in
the
AShape
interface. Some that are only interesting to a
specific implementation, may be defined in that particular
class.
Interactor
The Interactor is the central place where everything is
connected. It contains the
InteractionBroker
,
Interactions
and is the posting point for
InputEvents
.
All other parts are retrievable from the
Interactor
or it's
contained objects. Below are the components that is
aggregated in the
Interactor
.
AShape Developer Manual
Page 15 / 24