The bluegammon.gui.animation
package contains the general animation functionality as
well as specific gui animations.
Common animation logic is handled by AnimationEngine
. This class consists of animations
represented by the Animation
abstract class, and uses an implementation of the RepaintRequestable
interface to signal repaints (normally a Canvas
). Each implementation of an Animation
must
define following:
paint(Graphics g)
- paints the animation on specified contextnext()
- called when the animation needs be to updated. The interval
of an animation update is specified in getInterval()
getInterval()
- returns the interval in milliseconds between the next()
method will be called by the AnimationEngine
isFinished()
- called on each update and declares if this animation can be removed from
the AnimationEngine
This package also contains implementations of animations specific for the Bluegammon game. Some
of these animations sets the gui state when they are signalled as finished by overriding the
onExit
method.