lab1
Class RoundTile

java.lang.Object
  extended by lab1.GameTile
      extended by lab1.RoundTile

public class RoundTile
extends GameTile

A round tile manages painting of a circle in a specified area of the screen. Whenever the object should paint itself, it is told what size and position that should be used to paint it.


Constructor Summary
RoundTile(java.awt.Color fillColor)
          Creates a circular game tile.
RoundTile(java.awt.Color strokeColor, java.awt.Color fillColor)
          Creates a circular game tile with a stroke around it.
RoundTile(java.awt.Color strokeColor, java.awt.Color fillColor, double thickness)
          Creates a circular game tile with a stroke around it.
RoundTile(java.awt.Color strokeColor, java.awt.Color fillColor, double thickness, double scale)
          Creates a circular game tile with a stroke around it.
 
Method Summary
 void draw(java.awt.Graphics g, int x, int y, java.awt.Dimension d)
          Draws itself in a given graphics context, position and size.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundTile

public RoundTile(java.awt.Color fillColor)
Creates a circular game tile.

Parameters:
fillColor - the color of the interior of the circle.

RoundTile

public RoundTile(java.awt.Color strokeColor,
                 java.awt.Color fillColor)
Creates a circular game tile with a stroke around it.

Parameters:
strokeColor - the color of the stroke around the circle.
fillColor - the color of the interior of the circle.

RoundTile

public RoundTile(java.awt.Color strokeColor,
                 java.awt.Color fillColor,
                 double thickness)
Creates a circular game tile with a stroke around it.

Parameters:
strokeColor - the color of the stroke around the circle.
fillColor - the color of the interior of the circle.
thickness - the thickness of the stroke.

RoundTile

public RoundTile(java.awt.Color strokeColor,
                 java.awt.Color fillColor,
                 double thickness,
                 double scale)
Creates a circular game tile with a stroke around it.

Parameters:
strokeColor - the color of the stroke around the circle.
fillColor - the color of the interior of the circle.
thickness - the thickness of the stroke.
scale - size of the circle relative to the tile size.
Method Detail

draw

public void draw(java.awt.Graphics g,
                 int x,
                 int y,
                 java.awt.Dimension d)
Draws itself in a given graphics context, position and size.

Overrides:
draw in class GameTile
Parameters:
g - graphics context to draw on.
x - pixel x coordinate of the tile to be drawn.
y - pixel y coordinate of the tile to be drawn.
d - size of this object in pixels.