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(int size)
          Create a new FireWorksController that starts with no fireworks.
 
Method Summary
 int getSize()
           
 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.
 void setMode(int newMode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FireworksController

public FireworksController(int size)
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

getSize

public int getSize()

setMode

public void setMode(int newMode)