org.dishevelled.piccolo.sprite
Class SingleFrameAnimation

java.lang.Object
  extended by org.dishevelled.piccolo.sprite.SingleFrameAnimation
All Implemented Interfaces:
Animation

public final class SingleFrameAnimation
extends Object
implements Animation

Single frame animation.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Constructor Summary
SingleFrameAnimation(Image currentFrame)
          Create a new single frame animation with the specified current frame.
 
Method Summary
 boolean advance()
          Advance this animation one frame.
 Image getCurrentFrame()
          Return the current frame for this animation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleFrameAnimation

public SingleFrameAnimation(Image currentFrame)
Create a new single frame animation with the specified current frame.

Parameters:
currentFrame - current frame, must not be null
Method Detail

advance

public boolean advance()
Advance this animation one frame.

Specified by:
advance in interface Animation
Returns:
true if consumers of this animation should schedule a repaint

getCurrentFrame

public Image getCurrentFrame()
Return the current frame for this animation. The current frame will not be null.

Specified by:
getCurrentFrame in interface Animation
Returns:
the current frame for this animation


Copyright (c) 2006-2011 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).