Layouts – MiG InfoCom MiG Calendar AShape Developer Manual User Manual
Page 12
MiG InfoCom AB
laid out. All
AShape
s in the tree can have their own
AShapeLayout
.
DefaultAShapeLayout
is the one used
if none is set explicitly.
6. The
ARootShape
calls
paintSubTree()
on all its first
level children. This paints that sub tree depth first. When
all of the
RootAShape
's first level children has been
called, the whole tree has been painted.
7. The hit areas for the just painted shapes (that have the hit
area reporting turned on) are collected and stored in the
Interactor
s that are of type
MouseKeyInteractor
(normally only one). The
MouseKeyInteractor
will
make use of this information to listen for
MouseEvent
s
and/or
KeyEvent
s and when a “hit/mouse
hover/whatever” happens, maybe change something. See
Interactors below.
The hit areas will only be reported for
AShape
s that has
the property
AShape.A_REPORT_HIT_AREA,
which is
Boolean.FALSE
by default. If it is set to
false
, or not
set at all, no mouse interaction will be possible with this
sub shape. Only enable it for the sub shapes that needs it
though, since calculating them uses some resources.
8. Repeat all for next entity or end if done.
Layouts
The Layout Cycle
The
AShape
s are laid out every time it is painted. How this
cycle works is explained above.
The Layouts
There are three
AShapeLayout
s delivered with this
component.
DefaultAShapeLayout
A very simple layout, which is also the default one. It offers
the sub shapes the parent's actual bounds and let them place
themselves relative to that. For instance if all sub shapes had
the
PlaceRect
AbsRect.FILL
set, they would all have the
the same actual bounds as their parent, all overlapping each
other. In short, the siblings (first level sub shapes) doesn't
AShape Developer Manual
Page 12 / 24
Important!