java.lang.ObjectParticle
LineParticle
public class LineParticle
This particle is drawn as a line.
| 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 |
|---|
public LineParticle(double hue,
double startX,
double startY,
double length)
hue - A number from 0 to 1 that specifies desired hue of the
ParticlestartX - The starting x coordinatestartY - The starting y coordinatelength - The length of the line to draw, in pixels.| Method Detail |
|---|
public void drawSelf(java.awt.Graphics graphics)
drawSelf in class Particlegraphics - The Graphics object to draw onto.