Class squareLight

java.lang.Object
  |
  +--Light
        |
        +--squareLight

public class squareLight
extends Light

squareLight class allows us to represent a square Light instead of a circular light in a graphical context; this class also puts a black border around the light. The draw method is overridden, everthing else is inherited from Light.


Constructor Summary
squareLight(int size, java.awt.Color onColor, int x, int y)
          Construct a new squareLight.
 
Method Summary
 void draw(java.awt.Graphics g)
          Draw a squareLight framed with a black square using g.
 
Methods inherited from class Light
on, onColor, size, switchLight, x, y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

squareLight

public squareLight(int size,
                   java.awt.Color onColor,
                   int x,
                   int y)
Construct a new squareLight.

Method Detail

draw

public void draw(java.awt.Graphics g)
Draw a squareLight framed with a black square using g.

Overrides:
draw in class Light