org.deken.game.animation
Class AnimatedFrame

java.lang.Object
  extended by org.deken.game.animation.AnimatedFrame

public class AnimatedFrame
extends java.lang.Object

Title: AnimatedFrame

Description: The AnimatedFrame is a single image and it's duration time, that can be used with the Animation interface, to create an animation strip.

The image itself can be any class that extends the Image class, such as the BufferedImage and VolatileImage

Copyright: Copyright (c) 2005

Version:
1.0
Author:
Gary Deken: Based David Brackeen (Developing Games in Java)

Constructor Summary
AnimatedFrame(java.awt.Image image, long endTime)
          AnimatedFrame
 
Method Summary
 AnimatedFrame copy()
          clone Creates a copy of this object.
 long getEndTime()
          getEndTime
 java.awt.Image getImage()
          getImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimatedFrame

public AnimatedFrame(java.awt.Image image,
                     long endTime)
AnimatedFrame

The constructor takes an Image and the end time (or duration) of this animated frame.

Parameters:
image - Image
endTime - long
Method Detail

getImage

public java.awt.Image getImage()
getImage

This returns the image of this AnimatedFrame.

Returns:
Image

getEndTime

public long getEndTime()
getEndTime

This is the duration of this frame, in milliseconds. It can be the time since the begining of the animation strip, or just the length of this image's duration.

Returns:
long

copy

public AnimatedFrame copy()
clone Creates a copy of this object.

Returns:
Object