|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.Image com.sun.lwuit.IndexedImage com.sun.lwuit.StaticAnimation
public class StaticAnimation
An animation with pre-existing
Method Summary | |
---|---|
boolean |
animate()
Deprecated. Allows the animation to reduce "repaint" calls when it returns false. |
static StaticAnimation |
createAnimation(java.io.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,
java.lang.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 |
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 |
Image |
scaled(int width,
int height)
Deprecated. Returns a scaled version of this image image using 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 |
Methods inherited from class com.sun.lwuit.IndexedImage |
---|
getGraphics, getHeight, getImageDataByte, getPalette, getWidth, load, modifyAlpha, pack, pack, pack, rotate, subImage, toByteArray |
Methods inherited from class com.sun.lwuit.Image |
---|
applyMask, applyMask, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, drawImage, getImage, getRGB, getRGBCached, getSVGDocument, isAlphaMutableImageSupported, isOpaque, isSVG, isSVGSupported, lock, modifyAlpha, modifyAlphaWithTranslucency, scaledHeight, scaledSmallerRatio, scaledWidth, toRGB, unlock |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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(java.io.DataInputStream data) throws java.io.IOException
data
- input stream from which the animation is loaded
java.io.IOException
- when the stream throws itpublic boolean animate()
Animation
Display
class.
animate
in interface Animation
animate
in class Image
public void restart()
public void paint(Graphics g)
Animation
paint
in interface Animation
g
- graphics contextpublic boolean isLoop()
public void setLoop(boolean loop)
loop
- true for looping the animationprotected void drawImage(Graphics g, java.lang.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 Image scaled(int width, int height)
Image
scaled
in class IndexedImage
width
- width for the scalingheight
- height of the scaled image
public boolean isAnimation()
Image
isAnimation
in class Image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |