com.croftsoft.core.animation.painter
Class SpacePainter

java.lang.Object
  extended by com.croftsoft.core.animation.painter.SpacePainter
All Implemented Interfaces:
ComponentPainter

public final class SpacePainter
extends Object
implements ComponentPainter

Fills an area of the component with stars against black space.

Since:
2002-03-28
Version:
2003-07-05
Author:
David Wallace Croft

Constructor Summary
SpacePainter()
          Convenience constructor method.
SpacePainter(Rectangle paintArea, double starDensity)
          Main constructor method.
 
Method Summary
 void paint(JComponent component, Graphics2D graphics)
           
 void setPaintArea(Rectangle paintArea)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpacePainter

public SpacePainter(Rectangle paintArea,
                    double starDensity)
Main constructor method.

Parameters:
paintArea - If null, component.getBounds() will be used.

SpacePainter

public SpacePainter()
Convenience constructor method.

Method Detail

setPaintArea

public void setPaintArea(Rectangle paintArea)
Parameters:
paintArea - If null, component.getBounds() will be used.

paint

public void paint(JComponent component,
                  Graphics2D graphics)
Specified by:
paint in interface ComponentPainter

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)