All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.multimedia.Firework
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----symantec.itools.multimedia.Firework
- public class Firework
- extends Canvas
- implements Runnable
Firework component. Creates an animated fireworks image.
-
AnimationSpeed
- Speed at which animation occurs.
-
Gravity
- Controls gravity of the firework simulation.
-
MaxRocketExplosionEnergy
- Controls "energy" of firwork explosion.
-
MaxRocketNumber
- Maximum number of rockets.
-
MaxRocketPatchLength
- Controls the radius of the firework burst.
-
MaxRocketPatchNumber
- Controls the density of the firework burst.
-
RocketStyleVariability
- Chance of different rocket style.
-
Firework()
- Construct the defalut firework.
-
addNotify()
- Tells this component that it has been added to a container.
-
freezeRockets()
- Suspend the firework animation.
-
hide()
- Makes this component invisible.
-
paint(Graphics)
- Paints a black background for this firework.
-
removeNotify()
- Tells this component that it is being removed from a container.
-
reshape(int, int, int, int)
- Moves and/or resizes this component.
-
run()
- Firework thread body.
-
show()
- Makes this component visible.
-
unfreezeRockets()
- Resume the firework animation.
AnimationSpeed
public int AnimationSpeed
- Speed at which animation occurs. Delay time = 100 / AnimationSpeed.
Default value 10.
RocketStyleVariability
public int RocketStyleVariability
- Chance of different rocket style. Rocket sytle changes if Math.random() * 100 < RocketStyleVariability.
Default Value 10.
MaxRocketNumber
public int MaxRocketNumber
- Maximum number of rockets.
MaxRocketExplosionEnergy
public int MaxRocketExplosionEnergy
- Controls "energy" of firwork explosion. Default value 850.
MaxRocketPatchNumber
public int MaxRocketPatchNumber
- Controls the density of the firework burst. Larger numbers give higher density.
Default value 90.
MaxRocketPatchLength
public int MaxRocketPatchLength
- Controls the radius of the firework burst. Larger numbers give larger radius.
Default value 68.
Gravity
public int Gravity
- Controls gravity of the firework simulation.
Default value 400.
Firework
public Firework()
- Construct the defalut firework.
addNotify
public void addNotify()
- Tells this component that it has been added to a container.
This is a standard Java AWT method which gets called by the AWT when
this component is added to a container. Typically, it is used to
create this component's peer.
It has been overridden here to start the launcher thread.
- Overrides:
- addNotify in class Canvas
- See Also:
- removeNotify
removeNotify
public synchronized void removeNotify()
- Tells this component that it is being removed from a container.
This is a standard Java AWT method which gets called by the AWT when
this component is removed from a container. Typically, it is used to
destroy the peers of this component and all its subcomponents.
It has been overridden here to stop the launcher thread.
- Overrides:
- removeNotify in class Component
- See Also:
- addNotify
show
public synchronized void show()
- Makes this component visible.
This is a standard Java AWT method which gets called to show this
component. If this component was invisible due to a previous hide()
call it make this component visible again.
- Overrides:
- show in class Component
- See Also:
- hide
hide
public synchronized void hide()
- Makes this component invisible.
This is a standard Java AWT method which gets called to hide
this component. A hidden component cannot be seen by the user nor
does it take up space in its container, but it does continue to
exist.
- Overrides:
- hide in class Component
- See Also:
- show
reshape
public synchronized void reshape(int x,
int y,
int width,
int height)
- Moves and/or resizes this component.
This is a standard Java AWT method which gets called to move and/or
resize this component. Components that are in containers with layout
managers should not call this method, but rely on the layout manager
instead.
- Parameters:
- x - horizontal position in the parent's coordinate space
- y - vertical position in the parent's coordinate space
- width - the new width
- height - the new height
- Overrides:
- reshape in class Component
run
public void run()
- Firework thread body. This method is called by the Java virtual
machine is response to the program's call to the start method of
this thread.
freezeRockets
public void freezeRockets()
- Suspend the firework animation.
unfreezeRockets
public void unfreezeRockets()
- Resume the firework animation.
paint
public void paint(Graphics g)
- Paints a black background for this firework.
This is a standard Java AWT method which typically gets called
by the AWT to handle painting this component. It paints this component
using the given graphics context. The graphics context clipping region
is set to the bounding rectangle of this component and its <0,0>
coordinate is this component's top-left corner.
- Parameters:
- g - the graphics context used for painting
- Overrides:
- paint in class Canvas
- See Also:
- repaint, update
All Packages Class Hierarchy This Package Previous Next Index