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
-
ImageSequence(int, int, int)
- Creates an empty ImageSequence.
-
capacity()
- Returns the maximum number of SingleImages in the sequence.
-
elementAt(int)
- Returns the SingleImage at the specified index.
-
finalize()
- Called immediately before garbage collection of this object.
-
setElementAt(SingleImage, int)
- Sets the element at the specified index to be the specified SingleImage.
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
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
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
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
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