|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.FireworkIcon
public class FireworkIcon
FireworkIcon is an implementation of the AnimationIconInterface that allows for incrementing and
decrementing the FireworkIcon and painting it in the differing states to show an animation
of fireworks.
AnimationIconView
,
Fireworks
,
Serialized FormField Summary | |
---|---|
protected int |
explosionEnergy
|
protected int |
gravity
|
protected int |
height
|
protected int |
maxRocketExplosionEnergy
|
protected int |
maxRocketNumber
|
protected int |
maxRocketPatchLength
|
protected int |
maxRocketPatchNumber
|
protected int |
patchLength
|
protected int |
patchNumber
|
protected boolean |
reset
|
protected com.sas.visuals.Rocket[] |
rocket
|
protected boolean |
rocketsCreated
|
protected int |
rocketStyleVariability
|
protected long |
seed
|
protected int |
width
|
Constructor Summary | |
---|---|
FireworkIcon()
Default Constructor |
Method Summary | |
---|---|
protected void |
createRockets()
Create the rocket objects to be painted. |
void |
decrement()
Change the state of the rockets. |
int |
getGravity()
Get the gravity affecting the rockets. |
java.awt.Insets |
getInsets()
Return the insets. |
int |
getMaxRocketExplosionEnergy()
Get the maximum rocket explosion energy. |
int |
getMaxRocketNumber()
Get the maximum number of rockets created. |
int |
getMaxRocketPatchLength()
Get the maximum rocket patch length. |
int |
getMaxRocketPatchNumber()
Get the maximum rocket patch number. |
java.awt.Dimension |
getPreferredSize()
Get the preferredSize that was set on the FireworkIcon |
int |
getRocketStyleVariability()
Get the rocket style variability. |
void |
increment()
Change the state of the rockets. |
void |
paint(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint the background of the FireworkIcon. |
void |
paintAnimation(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint the fireworks animation in the current state. |
void |
reset()
Reset the fireworks state. |
void |
setGravity(int g)
Set the gravity. |
void |
setMaxRocketExplosionEnergy(int e)
Set the maximum rocket explosion energy. |
void |
setMaxRocketNumber(int n)
Set the maximum rocket number. |
void |
setMaxRocketPatchLength(int l)
Set the maximum rocket patch length. |
void |
setMaxRocketPatchNumber(int p)
Set the maximum rocket patch number. |
void |
setPreferredSize(java.awt.Dimension size)
Set the preferredSize of the fireworks. |
void |
setRocketStyleVariability(int var)
Set the rocket style variability |
Field Detail |
---|
protected int rocketStyleVariability
protected int maxRocketNumber
protected int maxRocketExplosionEnergy
protected int maxRocketPatchNumber
protected int maxRocketPatchLength
protected int gravity
protected transient int explosionEnergy
protected transient int patchNumber
protected transient int patchLength
protected transient long seed
protected transient com.sas.visuals.Rocket[] rocket
protected transient boolean rocketsCreated
protected transient boolean reset
protected int width
protected int height
Constructor Detail |
---|
public FireworkIcon()
Method Detail |
---|
protected void createRockets()
public int getGravity()
setGravity(int)
public java.awt.Insets getInsets()
getInsets
in interface com.sas.visuals.PainterInterface
AnimationIconInterface
public int getMaxRocketNumber()
setMaxRocketNumber(int)
public int getMaxRocketExplosionEnergy()
setMaxRocketExplosionEnergy(int)
public int getMaxRocketPatchNumber()
setMaxRocketPatchNumber(int)
public int getMaxRocketPatchLength()
setMaxRocketPatchLength(int)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in interface com.sas.visuals.IconInterface
setPreferredSize(java.awt.Dimension)
public int getRocketStyleVariability()
setRocketStyleVariability(int)
public void decrement()
decrement
in interface AnimationIconInterface
AnimationIconInterface
,
increment()
public void increment()
increment
in interface AnimationIconInterface
AnimationIconInterface
,
decrement()
public void paint(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
paint
in interface com.sas.visuals.PainterInterface
AnimationIconInterface
public void paintAnimation(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
paintAnimation
in interface AnimationIconInterface
comp
- the java.awt.Component to paint ong
- the graphics context to use for paintingx
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightAnimationIconInterface
public void reset()
reset
in interface AnimationIconInterface
AnimationIconInterface
public void setGravity(int g)
getGravity()
public void setMaxRocketNumber(int n)
getMaxRocketNumber()
public void setMaxRocketExplosionEnergy(int e)
getMaxRocketExplosionEnergy()
public void setMaxRocketPatchNumber(int p)
getMaxRocketPatchNumber()
public void setMaxRocketPatchLength(int l)
getMaxRocketPatchLength()
public void setPreferredSize(java.awt.Dimension size)
getPreferredSize()
public void setRocketStyleVariability(int var)
getRocketStyleVariability()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |