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.
-
AnimatedImageButton()
- Create a button.
-
AnimatedImageButton(String)
- Create a button with a text label.
-
addImage(Image)
- Add the next image to the animation with a default delay
after the frame.
-
addImage(Image, int)
- Add the next image to the animation.
-
disable()
- Disable the button.
-
mouseEnter(Event, int, int)
-
-
mouseExit(Event, int, int)
-
-
resetAnimation()
- Reset the animation back to the first frame.
-
run()
- The entry point of the animation thread.
-
setAnimateOnEnter(boolean)
- Sets whether the animation whould be started when the
pointer enters the button area.
-
setRepeat(boolean)
- Should the animation repeat or just run once?
-
start()
- Starts the animation.
-
startAnimation()
- Call this method to begin the animation after all the images
in the animation have been supplied.
-
stop()
- Stops the animation.
AnimatedImageButton
public AnimatedImageButton()
- Create a button. The animation sequence must be supplied
later.
AnimatedImageButton
public AnimatedImageButton(String label)
- Create a button with a text label. The animation sequence
must be supplied later.
start
public void start()
- Starts the animation. Generally used only after a call to stop().
- See Also:
- startAnimation
stop
public void stop()
- Stops the animation.
run
public void run()
- The entry point of the animation thread.
setAnimateOnEnter
public void setAnimateOnEnter(boolean b)
- Sets whether the animation whould be started when the
pointer enters the button area.
startAnimation
public void startAnimation()
- Call this method to begin the animation after all the images
in the animation have been supplied.
- See Also:
- addImage
resetAnimation
public void resetAnimation()
- Reset the animation back to the first frame.
setRepeat
public void setRepeat(boolean b)
- Should the animation repeat or just run once?
addImage
public void addImage(Image i)
- Add the next image to the animation with a default delay
after the frame.
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.
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
mouseEnter
public boolean mouseEnter(Event e,
int x,
int y)
- Overrides:
- mouseEnter in class Component
mouseExit
public boolean mouseExit(Event e,
int x,
int y)
- Overrides:
- mouseExit in class ImageButton
All Packages Class Hierarchy This Package Previous Next Index