MiG InfoCom MiG Calendar AShape Developer Manual User Manual
Page 10

MiG InfoCom AB
all non-paint functionality is implemented in
AbstractAShape
and thus not repeated for the subclasses
below.
RootAShape
– Must always be at the root of all
AShape
hierarchies, much like
Container
in Swing. Contains some
extra methods and fields that applies to the whole tree.
VectorAShape
– Wraps a normal Java2D
Shape
object and
gives it attributes such as
Paint
and anti-aliasing hints. Is
abstract.
FillAShape
– Extends
VectorAShape
(above) to provide
filling support for the shapes.
DrawAShape
- Extends
VectorAShape
(above) to provide
outline drawing support for the shapes.
TextAShape
– For drawing text within some bounds. Can be
rotated (+90 or -90 degrees) and set to wrap or not. A lot of
attributes exist that makes it powerful and flexible to use.
FittingTextAShape
– Subclass of
TextAShape
that
checks the available strings one by one and draws the first
one that fits the given bounds. Can be used if you have more
than one possible text to draw, (e.g. “Sunday”, “Sun” and
“S”) and want to paint the biggest one that fits.
ImageShape
– For drawing and possibly stretching images.
Can cache an arbitrary number of stretched versions of the
image.
SlicedImageAShape
– Extends
ImageAShape
and takes a
normal
Image
and slice it up in a 3x3 slices. These slices are
then stretched or tiled in a very flexible way to accommodate
for the common case where you have a template image that
you want to stretch to any size but where the border pixels
should be treated in a different way than the center slice.
This is a very common technique for themed GUI:s.
FilterAShape
– A generic abstract base class for drawing
filtered images, i.e. blurred or edge enhanced. Provides
caching and slicing (through a
SlicedImage
) to improve
performance in orders of magnitude, especially for
rectangular, edge filtered, images/shapes such as shadows.
Subclasses need only provide a
BufferedImageOp
, so
creating enhanced image shapes is done in a snap.
FeatherAShape
– Extends
FilterAShape
with a feather
AShape Developer Manual
Page 10 / 24