|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jappit.imagefx.AnimatedImage
public class AnimatedImage
AnimatedImage is the base class for representing animated images. Its usage is very similar to Image class, so few modifications are needed to switch from an Image to an AnimatedImage within a Java ME application. To create an AnimatedImage instance, it's sufficient to pass to its constructor an Image reference:
|
|
|
Constructor Summary | |
---|---|
AnimatedImage(javax.microedition.lcdui.Image image)
Creates an animated Image |
|
AnimatedImage(javax.microedition.lcdui.Image image,
ImageFx fx)
Creates an animated Image with the specified FX |
Method Summary | |
---|---|
boolean |
isEnded()
Checks if FX is ended |
void |
paint(javax.microedition.lcdui.Graphics g,
int x,
int y,
int constraints)
Draws the AnimatedImage applying the current FX |
void |
setFx(ImageFx fx)
Sets the FX |
void |
start(long duration)
Starts the FX animation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnimatedImage(javax.microedition.lcdui.Image image)
image
- the Image object to be animatedpublic AnimatedImage(javax.microedition.lcdui.Image image, ImageFx fx)
image
- the Image object to be animatedfx
- an FX to be applied to the ImageMethod Detail |
---|
public void setFx(ImageFx fx)
fx
- the FX to be applied to the Imagepublic void start(long duration)
duration
- the FX duration in millisecondspublic boolean isEnded()
public void paint(javax.microedition.lcdui.Graphics g, int x, int y, int constraints)
g
- the Graphics object to be used for rendering the AnimatedImagex
- the x coordinate of the anchor pointy
- the y coordinate of the anchor pointconstraints
- the anchor point for positioning the image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |