Interface Animation
- All Known Implementing Classes:
EdgeAnimation, JobAnimation, OptimizedQNAnimation, QueueNetAnimation, SampleQNAnimation, StationAnimation
public interface Animation
Created by IntelliJ IDEA.
User: orsotronIII
Date: 14-gen-2005
Time: 13.29.22
This Interface defines methods to implement a simple animation.
An
Animator object could then provide support
by refreshing it periodically.-
Method Summary
Modifier and TypeMethodDescriptionreturns background image for this animation.Returns bounding box for this animation, e.g.voidinit()Initialization method for implementing class.voidpaint(Graphics g, ImageObserver io) Paints image currently handled in a rectangle defined withinsetBounds(Rectangle)methodvoidrefresh()Called when an animation needs to be refreshed.voidsetBGImage(Image img) sets background image for this animation.voidSets bounding box for this animation.
-
Method Details
-
refresh
void refresh()Called when an animation needs to be refreshed. This method should update image currently handled by the animation -
init
void init()Initialization method for implementing class. The implementation of this method should prepare images for the animation, if this has not been done within constructor. -
paint
Paints image currently handled in a rectangle defined withinsetBounds(Rectangle)method -
getBGImage
Image getBGImage()returns background image for this animation.- Returns:
- :Background image for this animation
-
setBGImage
sets background image for this animation.- Parameters:
img- : background image for this animation
-
setBounds
Sets bounding box for this animation. If this box is set, animation will update only this certain area of the Graphics object passed withinpaint(Graphics, ImageObserver)method.- Parameters:
r- : Bounding box for this animation.
-
getBounds
Rectangle getBounds()Returns bounding box for this animation, e.g. the rectangle within which the frames for this animation will be painted- Returns:
- : Bounding box for this animation.
-