Class Animation

java.lang.Object
  extended by Animation

public class Animation
extends java.lang.Object

A collection of frames that represent an entire animation.


Constructor Summary
Animation()
           
 
Method Summary
 void add(int i)
          Add a new (empty) frame at the specified position
 void add(int i, AFrame f)
          Add a specified frame at the specified position
 AFrame get(int i)
          Gets the specified frame in this animation
 java.lang.String getName()
          Gets the name of this animation
 void remove(int i)
          Removes a frame.
 void set(AFrame f, int i)
          Sets the selected Frame
 void setName(java.lang.String s)
          Sets the name of this animation
 int size()
          Return size of this animation, in number of frames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animation

public Animation()
Method Detail

getName

public java.lang.String getName()
Gets the name of this animation

Returns:
name of this animation

setName

public void setName(java.lang.String s)
Sets the name of this animation

Parameters:
s - new name

get

public AFrame get(int i)
Gets the specified frame in this animation

Parameters:
i - Index of frame you want
Returns:
The selected frame

set

public void set(AFrame f,
                int i)
Sets the selected Frame

Parameters:
f - the frame you want to place in this animation
i - Index of the frame you want to override

remove

public void remove(int i)
Removes a frame. Subsequent frames shift to the left.

Parameters:
i - Index of frame you want to remove

add

public void add(int i)
Add a new (empty) frame at the specified position

Parameters:
i - Index you want to place the new frame in
See Also:
size()

add

public void add(int i,
                AFrame f)
Add a specified frame at the specified position

Parameters:
i - Index for new frame
f - data for new frame

size

public int size()
Return size of this animation, in number of frames

Returns:
number of frames