Class FireworksController

java.lang.Object
  extended by FireworksController

public class FireworksController
extends java.lang.Object

This class controls the moving, drawing and creation of fireworks.

Author:
Tim

Constructor Summary
FireworksController()
          Create a new FireWorksController that starts with no fireworks.
 
Method Summary
 void makeFirework(int x, int y)
          This method creates a new firework at the specified location.
 void moveAll()
          Tell all the current Particles to move themselves.
 void paintAll(java.awt.Graphics graphics)
          Tells all the current Particles to draw themselves using the given Graphics object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FireworksController

public FireworksController()
Create a new FireWorksController that starts with no fireworks.

Method Detail

moveAll

public void moveAll()
Tell all the current Particles to move themselves. Also removes uneeded particles.


paintAll

public void paintAll(java.awt.Graphics graphics)
Tells all the current Particles to draw themselves using the given Graphics object.

Parameters:
graphics - The Graphics object to use for drawing

makeFirework

public void makeFirework(int x,
                         int y)
This method creates a new firework at the specified location. This is called by FireworksWindow any time the mouse is clicked on the window. The coordinates of the mouse click are passed in as parameters.

Parameters:
x - The x coordinate of the mouse click
y - The y coordinate of the mouse click