public class StaticAnimation extends IndexedImage implements Animation
mutableCopy_
shownWarningForTooSmallBackgroundImage
Modifier | Constructor and Description |
---|---|
protected |
StaticAnimation(StaticAnimation img,
Void v)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
animate()
Deprecated.
Allows the animation to reduce "repaint" calls when it returns false.
|
static StaticAnimation |
createAnimation(DataInputStream data)
Deprecated.
Creates an animation from the given stream, this method is used internally
by Resources normally you should not create static animations manually.
|
protected void |
drawImage(Graphics g,
Object nativeGraphics,
int x,
int y)
Deprecated.
Callback invoked internally by LWUIT to draw the image/frame onto the display.
|
int |
getFrameCount()
Deprecated.
Returns the number of frames in the animation including the initial frame
|
int[] |
getFrameRGB(int frame)
Deprecated.
Returns the RGB for the given frame, this method is relatively slow and
it is recommended that you do not use it for realtime animations.
|
int |
getFrameTime(int frame)
Deprecated.
The time in which the given frame should appear
|
protected Object |
getInternalImage(int x,
int y)
Deprecated.
Return the internal image representation.
|
int |
getTotalAnimationTime()
Deprecated.
Returns the duration for the entire animation used to determine when to loop
|
boolean |
isAnimation()
Deprecated.
Returns true if this is an animated image
|
boolean |
isLoop()
Deprecated.
Indicates whether the animation will run in a loop or run only once
|
void |
paint(Graphics g)
Deprecated.
Draws the animation, within a component the standard paint method would be
invoked since it bares the exact same signature.
|
void |
restart()
Deprecated.
Restarts the animation
|
void |
scale(int width,
int height)
Deprecated.
Scale the image to the given width and height, this is a fast algorithm
that preserves translucent information
|
void |
setLoop(boolean loop)
Deprecated.
Indicates whether the animation will run in a loop or run only once
|
getGraphics, getHeight, getImageDataByte, getPalette, getRGB, getWidth, load, modifyAlpha, pack, pack, pack, rotate, subImage, tileRect, toByteArray
applyMask, applyMask, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, getImage, getRGB, getRGBCached, getSVGDocument, isAlphaMutableImageSupported, isOpaque, isSVG, isSVGSupported, modifyAlpha, modifyAlphaWithTranslucency, scaled, scaledHeight, scaledSmallerRatio, scaledWidth, toRGB
protected StaticAnimation(StaticAnimation img, Void v)
public int getFrameCount()
public int getFrameTime(int frame)
frame
- must be a number bigger than -1 and smaller than getFrameCount()public int getTotalAnimationTime()
public int[] getFrameRGB(int frame)
frame
- must be a number bigger than -1 and smaller than getFrameCount()public static StaticAnimation createAnimation(DataInputStream data) throws IOException
data
- input stream from which the animation is loadedIOException
- when the stream throws itpublic boolean animate()
Animation
Display
class.public void restart()
public void paint(Graphics g)
Animation
public boolean isLoop()
public void setLoop(boolean loop)
loop
- true for looping the animationprotected void drawImage(Graphics g, Object nativeGraphics, int x, int y)
Image
drawImage
in class IndexedImage
g
- the graphics objectnativeGraphics
- the underlying native graphics which might be essential for some image typesx
- the x coordinatey
- the y coordinatepublic void scale(int width, int height)
Image
scale
in class IndexedImage
width
- width for the scalingheight
- height of the scaled imagepublic boolean isAnimation()
Image
isAnimation
in class Image
protected Object getInternalImage(int x, int y)
Image
getInternalImage
in class IndexedImage