Class LineParticle

java.lang.Object
  extended by Particle
      extended by LineParticle
Direct Known Subclasses:
FunkyParticle

public class LineParticle
extends Particle

This particle is drawn as a line.

Author:
Tim

Constructor Summary
LineParticle(double hue, double startX, double startY, double length)
          Constructor that lets you determine color, line length and start position.
 
Method Summary
 void drawSelf(java.awt.Graphics graphics)
          Draw this Particle onto the provided Graphics object
 
Methods inherited from class Particle
getColor, getTimesMoved, getXPosition, getXVelocity, getYPosition, getYVelocity, setXPosition, setXVelocity, setYPosition, setYVelocity, takeOneStep
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineParticle

public LineParticle(double hue,
                    double startX,
                    double startY,
                    double length)
Constructor that lets you determine color, line length and start position.

Parameters:
hue - A number from 0 to 1 that specifies desired hue of the Particle
startX - The starting x coordinate
startY - The starting y coordinate
length - The length of the line to draw, in pixels.
Method Detail

drawSelf

public void drawSelf(java.awt.Graphics graphics)
Draw this Particle onto the provided Graphics object

Overrides:
drawSelf in class Particle
Parameters:
graphics - The Graphics object to draw onto.