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
-
dx
- The number of pixels to be skipped in the x-direction.
-
dy
- The number of pixels to be skipped in the y-direction.
-
endframe
- The frame number with which the animation ends.
-
imgx
- The current x-position of the image being displayed.
-
imgy
- The current y-position of the image being displayed.
-
preload
- Preload the animation frames when the animation is
first created.
-
src
- The source directory in which the images for the
animation reside.
-
startframe
- The frame number with which the animation starts.
-
AnimatedImageWidget()
- Create an animation with the rotating head of Johnathan.
-
AnimatedImageWidget(String, int, int, int)
- Create an animation.
-
advance()
- Advance the animation.
-
getDx()
- Get the number of pixels to be skipped in the x-direction.
-
getDy()
- Get the number of pixels to be skipped in the y-direction.
-
getEndframe()
- Get the frame number with which the animation ends.
-
getProperties(PropertyList)
- Get the properties of this widget.
-
getSource()
- Get the source for this animated image.
-
getStartframe()
- Get the frame number with which the animation starts.
-
imageUpdate(Image, int, int, int, int, int)
- Update the image.
-
init()
- Load the animation frames.
-
paint(Graphics)
- Paint the current frame of animation.
-
setDirection(int, int)
- Set the direction.
-
setDx(int)
- Set the number of pixels to be skipped in the x-direction.
-
setDy(int)
- Set the number of pixels to be skipped in the y-direction.
-
setEndframe(int)
- Set the frame number with which the animation ends.
-
setProperties(PropertyList)
- Set the properties of this widget.
-
setSource(String)
- Set the source for this animated image.
-
setStartframe(int)
- Set the frame number with which the animation starts.
-
start()
- Start the animation.
startframe
public int startframe
- The frame number with which the animation starts.
- See Also:
- getStartframe, setStartframe
endframe
public int endframe
- The frame number with which the animation ends.
- See Also:
- getEndframe, setEndframe
imgx
public float imgx
- The current x-position of the image being displayed.
imgy
public float imgy
- The current y-position of the image being displayed.
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
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
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
preload
public boolean preload
- Preload the animation frames when the animation is
first created.
AnimatedImageWidget
public AnimatedImageWidget()
- Create an animation with the rotating head of Johnathan.
AnimatedImageWidget
public AnimatedImageWidget(String src,
int fps,
int startFrame,
int endFrame)
- Create an animation.
getProperties
public void getProperties(PropertyList list)
- Get the properties of this widget.
- Overrides:
- getProperties in class AnimatedWidget
setProperties
public void setProperties(PropertyList list)
- Set the properties of this widget.
- Overrides:
- setProperties in class AnimatedWidget
getStartframe
public int getStartframe()
- Get the frame number with which the animation starts.
- See Also:
- startframe
setStartframe
public void setStartframe(int startframe)
- Set the frame number with which the animation starts.
- See Also:
- startframe
getEndframe
public int getEndframe()
- Get the frame number with which the animation ends.
- See Also:
- endframe
setEndframe
public void setEndframe(int endframe)
- Set the frame number with which the animation ends.
- See Also:
- endframe
getSource
public String getSource()
- Get the source for this animated image.
- See Also:
- src
setSource
public void setSource(String src)
- Set the source for this animated image.
- See Also:
- src
init
public void init()
- Load the animation frames.
- Overrides:
- init in class Widget
start
public void start()
- Start the animation.
- Overrides:
- start in class AnimatedWidget
getDx
public int getDx()
- Get the number of pixels to be skipped in the x-direction.
- See Also:
- dx
setDx
public void setDx(int dx)
- Set the number of pixels to be skipped in the x-direction.
- See Also:
- dx
getDy
public int getDy()
- Get the number of pixels to be skipped in the y-direction.
- See Also:
- dy
setDy
public void setDy(int dy)
- Set the number of pixels to be skipped in the y-direction.
- See Also:
- dy
setDirection
public void setDirection(int dx,
int dy)
- Set the direction.
- See Also:
- dx, dy
advance
public void advance()
- Advance the animation.
- Overrides:
- advance in class AnimatedWidget
imageUpdate
public boolean imageUpdate(Image newimg,
int flags,
int x,
int y,
int w,
int h)
- Update the image.
- Overrides:
- imageUpdate in class Widget
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