Class EdgeAnimation
java.lang.Object
common.animation.EdgeAnimation
- All Implemented Interfaces:
Animation, JobContainer
Created by IntelliJ IDEA.
User: orsotronIII
Date: 17-gen-2005
Time: 13.55.01
This class implements an animation for an edge of the graph that represents the queue net.
Once the coords of the angles (which may only be straight angles)of that edge are set, the
methods provide support for the output of this edge animation. This means that once the
paint method is called, the bounding box for this animation is refreshed with the new frame.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Vector<JobAnimation> vector containing all of the jobs that currently are running on this edge of the queue net -
Constructor Summary
ConstructorsConstructorDescriptionEdgeAnimation(EdgeAnimation edge) Creates a new instance of Edgeanimation from another edge animation.EdgeAnimation(Point[] angles, int margin) Creates a new instance of Edgeanimation.EdgeAnimation(Point[] angles, int margin, IconsToolkit toolkit) Creates a new instance of Edgeanimation. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddJob(JobAnimation newJob) Puts another Job on this edge.returns 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 withinAnimation.setBounds(Rectangle)methodvoidrefresh()Refreshes appearence of the image to be rendered.voidsetBGImage(Image img) sets background image for this animation.voidSets bounding box for this animation.
-
Field Details
-
jobAnimations
vector containing all of the jobs that currently are running on this edge of the queue net
-
-
Constructor Details
-
EdgeAnimation
Creates a new instance of Edgeanimation. This must be initialized with a set of points which are coords of starting point of this edge, points where this edge turns with a straight angle (which may be omitted in case this edge does not turn), and finally ending point for this edge. All of the coords must be given in the real animation resolution scale.- Parameters:
angles- : coords of the angle points.margin- : width of border of this edge. Used to calculate boundingbox for this animation from coords of the angle points
-
EdgeAnimation
Creates a new instance of Edgeanimation. This must be initialized with a set of points which are coords of starting point of this edge, points where this edge turns with a straight angle (which may be omitted in case this edge does not turn), and finally ending point for this edge. All of the coords must be given in the real animation resolution scale.- Parameters:
angles- : coords of the angle points.margin- : width of border of this edge. Used to calculate boundingbox for this animation from coords of the angle pointstoolkit- : toolkit for customized renderization of this edge.
-
EdgeAnimation
Creates a new instance of Edgeanimation from another edge animation.- Parameters:
edge- : edge to be copied.
-
-
Method Details
-
addJob
Puts another Job on this edge. The initial position is set to 0(e.g. the starting point of this edge)- Specified by:
addJobin interfaceJobContainer- Parameters:
newJob- : job to be added.
-
refresh
-
init
-
paint
Description copied from interface:AnimationPaints image currently handled in a rectangle defined withinAnimation.setBounds(Rectangle)method -
getBGImage
Description copied from interface:Animationreturns background image for this animation.- Specified by:
getBGImagein interfaceAnimation- Returns:
- :Background image for this animation
-
setBGImage
Description copied from interface:Animationsets background image for this animation.- Specified by:
setBGImagein interfaceAnimation- Parameters:
img- : background image for this animation
-
setBounds
Description copied from interface:AnimationSets bounding box for this animation. If this box is set, animation will update only this certain area of the Graphics object passed withinAnimation.paint(Graphics, ImageObserver)method. -
getBounds
-