edu.kzoo.grid.display
Class CheckeredBackgroundDisplay

java.lang.Object
  |
  +--edu.kzoo.grid.display.CheckeredBackgroundDisplay
All Implemented Interfaces:
GridBackgroundDisplay

public class CheckeredBackgroundDisplay
extends java.lang.Object
implements GridBackgroundDisplay

Grid Display Package:
The GridBackgroundDisplay interface specifies the method that must be provided by any class used to display a Grid background.

Version:
Sep 1, 2004
Author:
Joel Booth

Constructor Summary
CheckeredBackgroundDisplay(ScrollableGridDisplay enclosingDisplay, java.awt.Color upperLeftColor, java.awt.Color otherColor)
          Constructs a background display that draws a checkered background for a grid, using the specified colors.
 
Method Summary
 void drawBackground(java.awt.Graphics2D g2)
          Draws the grid background.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckeredBackgroundDisplay

public CheckeredBackgroundDisplay(ScrollableGridDisplay enclosingDisplay,
                                  java.awt.Color upperLeftColor,
                                  java.awt.Color otherColor)
Constructs a background display that draws a checkered background for a grid, using the specified colors.

Parameters:
enclosingDisplay - the overall grid display for which this object will draw the background
upperLeftColor - color to display in upper-left corner and every other cell after that
otherColor - the alternate color
Method Detail

drawBackground

public void drawBackground(java.awt.Graphics2D g2)
Description copied from interface: GridBackgroundDisplay
Draws the grid background.

Specified by:
drawBackground in interface GridBackgroundDisplay
Parameters:
g2 - the Graphics2 object to use to render