public class BumpAnimation extends java.lang.Object implements Animation
Constructor and Description |
---|
BumpAnimation(java.awt.image.BufferedImage image,
java.awt.Point start,
java.awt.Dimension cellSize,
java.awt.Point direction)
Creates a bump animation that will travel one cell in the given
direction.
|
BumpAnimation(java.awt.image.BufferedImage image,
java.awt.Point start,
java.awt.Point end)
Creates a bump animation that will travel from the start to the end point
and then back.
|
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 BumpAnimation(java.awt.image.BufferedImage image, java.awt.Point start, java.awt.Dimension cellSize, java.awt.Point direction)
image
- start
- cellSize
- direction
- public BumpAnimation(java.awt.image.BufferedImage image, java.awt.Point start, java.awt.Point end)
image
- start
- end
- 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