Class Framework.PascalsCarpet

java.lang.Object
  extended by Framework.PascalsCarpet
All Implemented Interfaces:
Framework.Drawable
Enclosing class:
Framework

public class Framework.PascalsCarpet
extends java.lang.Object
implements Framework.Drawable

Initial implementation of the Drawable interface that will determine and display a number of rows of Pascal's Triangle. Declared private solely for the purpose of javadoc.

Author:
C. D'Arcy

Field Summary
 
Fields inherited from interface Framework.Drawable
bgColor, fgColor, palette, random
 
Constructor Summary
Framework.PascalsCarpet(java.awt.Dimension appDimen)
           
 
Method Summary
 void draw(java.awt.image.BufferedImage img)
          Called by respective Drawable's createNewGraphics' method.
 boolean finished()
          Sets the status of the rendering to completed.
 java.awt.Color getBackgroundColor()
          Merely returns the background color for this Drawable.
 void setCompleted()
          Sets the status of the rendering to completed.
 void setMouseEvent(java.awt.event.MouseEvent e)
          Allows all implementers to react to mouse events passed from the content class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Framework.PascalsCarpet

public Framework.PascalsCarpet(java.awt.Dimension appDimen)
Method Detail

draw

public void draw(java.awt.image.BufferedImage img)
Called by respective Drawable's createNewGraphics' method. This is where the specific drawing takes place.

Specified by:
draw in interface Framework.Drawable
Parameters:
img - a BufferedImage to draw to.

getBackgroundColor

public java.awt.Color getBackgroundColor()
Description copied from interface: Framework.Drawable
Merely returns the background color for this Drawable.

Specified by:
getBackgroundColor in interface Framework.Drawable
Returns:
the Color of the background for this Drawable.

setMouseEvent

public void setMouseEvent(java.awt.event.MouseEvent e)
Description copied from interface: Framework.Drawable
Allows all implementers to react to mouse events passed from the content class.

Specified by:
setMouseEvent in interface Framework.Drawable
Parameters:
e - The MouseEvent that the object is to respond to.

finished

public boolean finished()
Description copied from interface: Framework.Drawable
Sets the status of the rendering to completed. Called by Content's stopThread method to interrupt and terminate the rendering thread.

Specified by:
finished in interface Framework.Drawable

setCompleted

public void setCompleted()
Description copied from interface: Framework.Drawable
Sets the status of the rendering to completed. Called by Content's stopThread method to interrupt and terminate the rendering thread.

Specified by:
setCompleted in interface Framework.Drawable