public class WiggleAnimation extends java.lang.Object implements Animation
Constructor and Description |
---|
WiggleAnimation(java.awt.image.BufferedImage image,
java.awt.Point origin,
double impulse,
java.awt.Point maxDistance,
long duration) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae) |
int |
getDelay()
Returns the number of milliseconds desired between frames of animation.
|
java.awt.image.BufferedImage |
getImage()
Returns the static image associated with this animation.
|
java.awt.Point |
getLocation()
Returns the coordinate of the top left corner of the animation.
|
boolean |
isActive()
Returns true if the component should continue to be allowed to animate.
|
void |
remove()
Removes this animation from the component it's in.
|
void |
setComponent(javax.swing.JComponent component)
Sets the Component in which this animation will take place.
|
public WiggleAnimation(java.awt.image.BufferedImage image, java.awt.Point origin, double impulse, java.awt.Point maxDistance, long duration)
public boolean isActive()
Animation
public int getDelay()
Animation
public java.awt.image.BufferedImage getImage()
Animation
public void setComponent(javax.swing.JComponent component)
Animation
setComponent
in interface Animation
public void remove()
Animation
public java.awt.Point getLocation()
Animation
getLocation
in interface Animation
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener