Class anim.ImageSequence
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class anim.ImageSequence

java.lang.Object
   |
   +----anim.AnimImage
           |
           +----anim.ImageSequence

public class ImageSequence
extends AnimImage
A sequence of SingleImages used as data for a Sprite. It is an ordered set of SingleImages, all the same size.

Copyright (c) 1996-1997 Intel Corporation

See Also:
SingleImage, DynamicDataSprite, StaticDataSprite

CONSTRUCTOR INDEX

 O ImageSequence(int, int, int)
Creates an empty ImageSequence.

METHOD INDEX

 O capacity()
Returns the maximum number of SingleImages in the sequence.
 O elementAt(int)
Returns the SingleImage at the specified index.
 O finalize()
Called immediately before garbage collection of this object.
 O setElementAt(SingleImage, int)
Sets the element at the specified index to be the specified SingleImage.

CONSTRUCTORS

 O ImageSequence
  public ImageSequence(int maxCount,
                       int width,
                       int height)
Creates an empty ImageSequence.
Parameters:
maxCount - maximum number of SingleImage's in the sequence
width - width of source image in pixels (must be a multiple of 4), if it is not, it will be rounded down if width or height or maxCount are out of range, they will be set to default values which are 0, 0, 1 (width, height, maxCount)
height - height of source image in pixels

METHODS

 O finalize
  protected void finalize() throws Throwable
Called immediately before garbage collection of this object.
Throws: Throwable
Never thrown. See Object.finalize for further information.
Overrides:
finalize in class Object
 O setElementAt
  public synchronized boolean setElementAt(SingleImage si,
                                           int index)
Sets the element at the specified index to be the specified SingleImage. The previous element at that position is discarded.
Parameters:
si - the new source image for the specified sequence position
index - the sequence position (zero is first) for the specified SingleImage
Returns:
false if the index was out of bounds. true otherwise
 O elementAt
  public synchronized SingleImage elementAt(int index) throws ArrayIndexOutOfBoundsException
Returns the SingleImage at the specified index.
Parameters:
index - the sequence position (zero is first) of the desired SingleImage
Returns:
the SingleImage last set for this position by setElementAt if any
Throws: ArrayIndexOutOfBoundsException
thrown if the index provided was out of range (less than zero or greater than number of images in this sequence
 O capacity
  public int capacity()
Returns the maximum number of SingleImages in the sequence. This maximum is set when the constructor is called.
Returns:
capacity for this ImageSequence

All Packages  Class Hierarchy  This Package  Previous  Next  Index
Free Web Hosting