Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## animation
Class Animation

    java.lang.Object
      animation.Animation

All Implemented Interfaces:
  java.io.Serializable

    public class Animation

extends java.lang.Object
implements java.io.Serializable

This class represents an animation

Author:
  Frank Bruns
See Also:
  Serialized Form

Constructor Summary
`Animation(java.awt.image.BufferedImage[] images, java.lang.String name)` Creates a new animation with infinite duration.
`Animation(java.awt.image.BufferedImage[] images, java.lang.String name, long dur)` Creates a new animation

Method Summary
`long` | `getDuration()` Returns the duration (in miliseconds) of the animation.
`java.awt.image.BufferedImage[]` | `getImages()` Returns the image sequence that forms the animation
`java.lang.String` | `getName()` Returns the reference name that has been specified for the animation
`boolean` | `isInfinite()` Determines whether the animation has infinite duration or not.
`boolean` | `isRunning()` Determines whether this animation is currently running
`void` | `setRunning(boolean running)` Sets if the animation is currently running.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Animation

    public Animation(java.awt.image.BufferedImage[] images,
                     java.lang.String name,
                     long dur)

  Creates a new animation

  Parameters:
    `images` - animation images
    `name` - animation reference name
    `dur` - duration of the animation

### Animation

    public Animation(java.awt.image.BufferedImage[] images,
                     java.lang.String name)

  Creates a new animation with infinite duration. Such animations only get eliminated from the animation schedule by clearing the schedule with the scheduler's clear() method.

  Parameters:
    `images` - animation images
    `name` - animation reference name

Method Detail

### getImages

    public java.awt.image.BufferedImage[] getImages()

  Returns the image sequence that forms the animation

  Returns:
    animation images

### getDuration

    public long getDuration()

  Returns the duration (in miliseconds) of the animation. A duration of -1 means infinite duration and has to be processed as such.

  Returns:
    duration of the animation, -1 is infinite duration

### isInfinite

    public boolean isInfinite()

  Determines whether the animation has infinite duration or not.

  Returns:
    has infinite duration? --> true=yes, false=no

### isRunning

    public boolean isRunning()

  Determines whether this animation is currently running

  Returns:
    is currently running? --> true=yes, false=no

### setRunning

    public void setRunning(boolean running)

  Sets if the animation is currently running.

  Parameters:
    `running` - is running? --> true=yes, false=no

### getName

    public java.lang.String getName()

  Returns the reference name that has been specified for the animation

  Returns:
    animation reference name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD