Interface Framework.Drawable

All Known Implementing Classes:
Framework.About, Framework.ChaosGame, Framework.IslandTiling, Framework.LinearCantor, Framework.LSystem, Framework.PascalsCarpet, Framework.PascalsNumbers, Framework.QuadraticKoch, Framework.QuadricCantor, Framework.SnowflakeTiling, Framework.TriadicCantor, Framework.TriadicKoch
Enclosing class:
Framework

public static interface Framework.Drawable

Simple interface used for all drawable classes. Every drawable object requires a method to draw to a given BufferedImage, and a method returning the background color used.

Version:
1.0
Author:
iComery

Field Summary
static java.awt.Color bgColor
           
static java.awt.Color fgColor
           
static java.awt.Color[] palette
           
static java.util.Random random
           
 
Method Summary
 void draw(java.awt.image.BufferedImage drawTo)
          Draws itself to the parameterized BufferedImage.
 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.
 

Field Detail

fgColor

static final java.awt.Color fgColor

bgColor

static final java.awt.Color bgColor

palette

static final java.awt.Color[] palette

random

static final java.util.Random random
Method Detail

draw

void draw(java.awt.image.BufferedImage drawTo)
Draws itself to the parameterized BufferedImage.

Parameters:
drawTo - a BufferedImage to draw to.

getBackgroundColor

java.awt.Color getBackgroundColor()
Merely returns the background color for this Drawable.

Returns:
the Color of the background for this Drawable.

setMouseEvent

void setMouseEvent(java.awt.event.MouseEvent e)
Allows all implementers to react to mouse events passed from the content class.

Parameters:
e - The MouseEvent that the object is to respond to.

finished

boolean finished()
Sets the status of the rendering to completed. Called by Content's stopThread method to interrupt and terminate the rendering thread.


setCompleted

void setCompleted()
Sets the status of the rendering to completed. Called by Content's stopThread method to interrupt and terminate the rendering thread.