Class marimba.gui.AnimatedImageWidget
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.gui.AnimatedImageWidget

java.lang.Object
   |
   +----marimba.gui.Widget
           |
           +----marimba.gui.AnimatedWidget
                   |
                   +----marimba.gui.AnimatedImageWidget

public class AnimatedImageWidget
extends AnimatedWidget
A simple animation widget modelled after the AnimatedImage applets.
Version:
1.25, 11/13/96
Author:
Arthur van Hoff

Variable Index

 o dx
The number of pixels to be skipped in the x-direction.
 o dy
The number of pixels to be skipped in the y-direction.
 o endframe
The frame number with which the animation ends.
 o imgx
The current x-position of the image being displayed.
 o imgy
The current y-position of the image being displayed.
 o preload
Preload the animation frames when the animation is first created.
 o src
The source directory in which the images for the animation reside.
 o startframe
The frame number with which the animation starts.

Constructor Index

 o AnimatedImageWidget()
Create an animation with the rotating head of Johnathan.
 o AnimatedImageWidget(String, int, int, int)
Create an animation.

Method Index

 o advance()
Advance the animation.
 o getDx()
Get the number of pixels to be skipped in the x-direction.
 o getDy()
Get the number of pixels to be skipped in the y-direction.
 o getEndframe()
Get the frame number with which the animation ends.
 o getProperties(PropertyList)
Get the properties of this widget.
 o getSource()
Get the source for this animated image.
 o getStartframe()
Get the frame number with which the animation starts.
 o imageUpdate(Image, int, int, int, int, int)
Update the image.
 o init()
Load the animation frames.
 o paint(Graphics)
Paint the current frame of animation.
 o setDirection(int, int)
Set the direction.
 o setDx(int)
Set the number of pixels to be skipped in the x-direction.
 o setDy(int)
Set the number of pixels to be skipped in the y-direction.
 o setEndframe(int)
Set the frame number with which the animation ends.
 o setProperties(PropertyList)
Set the properties of this widget.
 o setSource(String)
Set the source for this animated image.
 o setStartframe(int)
Set the frame number with which the animation starts.
 o start()
Start the animation.

Variables

 o startframe
  public int startframe
The frame number with which the animation starts.
See Also:
getStartframe, setStartframe
 o endframe
  public int endframe
The frame number with which the animation ends.
See Also:
getEndframe, setEndframe
 o imgx
  public float imgx
The current x-position of the image being displayed.
 o imgy
  public float imgy
The current y-position of the image being displayed.
 o src
  public String src
The source directory in which the images for the animation reside. In that directory there must be .gif files with the name T's'.gif to T'e'.gif, where 'e' is endFrame and 's' is the startFrame. If both startframe and endframe are zero, it is assumed that the animation consists of one image with the filename in this variable. So in that case no subdirectory is used.
See Also:
getSource, setSource
 o dx
  public int dx
The number of pixels to be skipped in the x-direction. This also determines the direction of the animation.
See Also:
getDx, setDx, setDirection
 o dy
  public int dy
The number of pixels to be skipped in the y-direction. This also determines the direction of the animation.
See Also:
getDy, setDy, setDirection
 o preload
  public boolean preload
Preload the animation frames when the animation is first created.

Constructors

 o AnimatedImageWidget
  public AnimatedImageWidget()
Create an animation with the rotating head of Johnathan.
 o AnimatedImageWidget
  public AnimatedImageWidget(String src,
                             int fps,
                             int startFrame,
                             int endFrame)
Create an animation.

Methods

 o getProperties
  public void getProperties(PropertyList list)
Get the properties of this widget.
Overrides:
getProperties in class AnimatedWidget
 o setProperties
  public void setProperties(PropertyList list)
Set the properties of this widget.
Overrides:
setProperties in class AnimatedWidget
 o getStartframe
  public int getStartframe()
Get the frame number with which the animation starts.
See Also:
startframe
 o setStartframe
  public void setStartframe(int startframe)
Set the frame number with which the animation starts.
See Also:
startframe
 o getEndframe
  public int getEndframe()
Get the frame number with which the animation ends.
See Also:
endframe
 o setEndframe
  public void setEndframe(int endframe)
Set the frame number with which the animation ends.
See Also:
endframe
 o getSource
  public String getSource()
Get the source for this animated image.
See Also:
src
 o setSource
  public void setSource(String src)
Set the source for this animated image.
See Also:
src
 o init
  public void init()
Load the animation frames.
Overrides:
init in class Widget
 o start
  public void start()
Start the animation.
Overrides:
start in class AnimatedWidget
 o getDx
  public int getDx()
Get the number of pixels to be skipped in the x-direction.
See Also:
dx
 o setDx
  public void setDx(int dx)
Set the number of pixels to be skipped in the x-direction.
See Also:
dx
 o getDy
  public int getDy()
Get the number of pixels to be skipped in the y-direction.
See Also:
dy
 o setDy
  public void setDy(int dy)
Set the number of pixels to be skipped in the y-direction.
See Also:
dy
 o setDirection
  public void setDirection(int dx,
                           int dy)
Set the direction.
See Also:
dx, dy
 o advance
  public void advance()
Advance the animation.
Overrides:
advance in class AnimatedWidget
 o imageUpdate
  public boolean imageUpdate(Image newimg,
                             int flags,
                             int x,
                             int y,
                             int w,
                             int h)
Update the image.
Overrides:
imageUpdate in class Widget
 o paint
  public synchronized void paint(Graphics g)
Paint the current frame of animation.
Overrides:
paint in class Widget

All Packages  Class Hierarchy  This Package  Previous  Next  Index