public class SlideAnimation extends java.lang.Object implements Animation
Constructor and Description |
---|
SlideAnimation(java.awt.image.BufferedImage image,
java.awt.Point start,
java.awt.Point end,
int delay)
Creates a sliding animation from the start point to the end point.
|
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 is still being moved.
|
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 SlideAnimation(java.awt.image.BufferedImage image, java.awt.Point start, java.awt.Point end, int delay)
image
- start
- end
- delay
- public boolean isActive()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
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