org.problets.lib.io.output.overlay
Class Overlay

java.lang.Object
  extended by org.problets.lib.io.output.overlay.Overlay
Direct Known Subclasses:
OverlayArrow, OverlayBox, OverlayEllipse, OverlayText

public class Overlay
extends java.lang.Object

To provide the Overlay and the base for the Hierarcy of classes which use the same get methods and have the same functions draw and animate

Author:
Tihomir Piskuliyski

Constructor Summary
Overlay(java.awt.Color inColor)
          The constructor takes values for the color of the of the Overlay object which is being manipulated.
 
Method Summary
 void animate(java.awt.Graphics g, int x, int y)
          Animates an Overlay object
 void draw(java.awt.Graphics g, int x, int y)
          Draws an Overlay object
 int getHeight(java.awt.Graphics g)
          Returns the height of the bounding box of the Overlay object
 int getWidth(java.awt.Graphics g)
          Returns the width of the bounding box of the Overlay object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Overlay

public Overlay(java.awt.Color inColor)
The constructor takes values for the color of the of the Overlay object which is being manipulated. The value of isAnimated is set to false because the Overlay object hasn't been animated yet. The graphical context which is to be manipulatedis set to null. The font matrics if a text Overlay object is going to be manipulated is set to null.

Parameters:
inWidth - The width of the bounding box of the ellipse
inHeight - The height of the bounding box of the ellipse
inColor - The color of the ellipse
Method Detail

draw

public void draw(java.awt.Graphics g,
                 int x,
                 int y)
Draws an Overlay object

Parameters:
g - The graphical context of the applet
x - The x coordinate corresponding to the different manipulations needed for the Overlay object
y - The y coordinate corresponding to the different manipulations needed for the Overlay object

animate

public void animate(java.awt.Graphics g,
                    int x,
                    int y)
Animates an Overlay object

Parameters:
g - The graphical context of the applet
x - The x coordinate corresponding to the different manipulations needed for the Overlay object
y - The y coordinate corresponding to the different manipulations needed for the Overlay object

getHeight

public int getHeight(java.awt.Graphics g)
Returns the height of the bounding box of the Overlay object

Parameters:
g - The graphical context of the applet
Returns:
height The height of the ellipse in pixels

getWidth

public int getWidth(java.awt.Graphics g)
Returns the width of the bounding box of the Overlay object

Parameters:
g - The graphical context of the applet
Returns:
height The height of the ellipse in pixels