org.problets.lib.io.output.overlay
Class OverlayEllipse
java.lang.Object
org.problets.lib.io.output.overlay.Overlay
org.problets.lib.io.output.overlay.OverlayEllipse
public class OverlayEllipse
- extends Overlay
The ellipse class either animates outline of an ellipse or draws an
ellipse without animating it.
- Author:
- Tihomir Piskuliyski
Constructor Summary |
OverlayEllipse(int inWidth,
int inHeight,
java.awt.Color inColor)
The constructor sets the values for the width, height and the color
of the ellipse. |
Method Summary |
void |
animate(java.awt.Graphics g,
int x,
int y)
Animates the outline of an ellipse. |
void |
draw(java.awt.Graphics g,
int x,
int y)
Draws the outline of an ellipse. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OverlayEllipse
public OverlayEllipse(int inWidth,
int inHeight,
java.awt.Color inColor)
- The constructor sets the values for the width, height and the color
of the ellipse.
- Parameters:
inWidth
- The width of the bounding box of the ellipseinHeight
- The height of the bounding box of the ellipseinColor
- The color of the ellipse
draw
public void draw(java.awt.Graphics g,
int x,
int y)
- Draws the outline of an ellipse.
- Overrides:
draw
in class Overlay
- Parameters:
g
- The graphical context of the appletx
- The x coordinate of the upper left corner the bounding box of the ellipsey
- The y coordinate of the upper left corner the bounding box of the ellipse
animate
public void animate(java.awt.Graphics g,
int x,
int y)
- Animates the outline of an ellipse. If the ellipse is animated once
and the applet has to be redrawn, the function only draws the ellipse without
animating it. The ellipse is animated in approximately half a second drawing
14 degrees of the outline each MillisecondsIterator milli seconds. The animation starts from
the upper right corner and goes counter-clockwise.
- Overrides:
animate
in class Overlay
- Parameters:
g
- The graphical context of the appletx
- The x coordinate of the upper left corner the bounding box of the ellipsey
- The y coordinate of the upper left corner the bounding box of the ellipse