Class spt.gui.AnimatedImageButton
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class spt.gui.AnimatedImageButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----spt.gui.ImageButton
                                   |
                                   +----spt.gui.AnimatedImageButton

public class AnimatedImageButton
extends ImageButton
implements Runnable
A push button on which animations can be displayed. A text label may also be displayed.

Constructor Index

 o AnimatedImageButton()
Create a button.
 o AnimatedImageButton(String)
Create a button with a text label.

Method Index

 o addImage(Image)
Add the next image to the animation with a default delay after the frame.
 o addImage(Image, int)
Add the next image to the animation.
 o disable()
Disable the button.
 o mouseEnter(Event, int, int)
 o mouseExit(Event, int, int)
 o resetAnimation()
Reset the animation back to the first frame.
 o run()
The entry point of the animation thread.
 o setAnimateOnEnter(boolean)
Sets whether the animation whould be started when the pointer enters the button area.
 o setRepeat(boolean)
Should the animation repeat or just run once?
 o start()
Starts the animation.
 o startAnimation()
Call this method to begin the animation after all the images in the animation have been supplied.
 o stop()
Stops the animation.

Constructors

 o AnimatedImageButton
  public AnimatedImageButton()
Create a button. The animation sequence must be supplied later.
 o AnimatedImageButton
  public AnimatedImageButton(String label)
Create a button with a text label. The animation sequence must be supplied later.

Methods

 o start
  public void start()
Starts the animation. Generally used only after a call to stop().
See Also:
startAnimation
 o stop
  public void stop()
Stops the animation.
 o run
  public void run()
The entry point of the animation thread.
 o setAnimateOnEnter
  public void setAnimateOnEnter(boolean b)
Sets whether the animation whould be started when the pointer enters the button area.
 o startAnimation
  public void startAnimation()
Call this method to begin the animation after all the images in the animation have been supplied.
See Also:
addImage
 o resetAnimation
  public void resetAnimation()
Reset the animation back to the first frame.
 o setRepeat
  public void setRepeat(boolean b)
Should the animation repeat or just run once?
 o addImage
  public void addImage(Image i)
Add the next image to the animation with a default delay after the frame.
 o addImage
  public void addImage(Image i,
                       int delay)
Add the next image to the animation. During playback the given number of milliseconds should be paused before the next frame.
 o disable
  public void disable()
Disable the button. The animation is stopped and a "disabled" version of the current image is displayed.
Overrides:
disable in class ImageButton
 o mouseEnter
  public boolean mouseEnter(Event e,
                            int x,
                            int y)
Overrides:
mouseEnter in class Component
 o mouseExit
  public boolean mouseExit(Event e,
                           int x,
                           int y)
Overrides:
mouseExit in class ImageButton

All Packages  Class Hierarchy  This Package  Previous  Next  Index