shownWarningForTooSmallBackgroundImage
Modifier and Type | Method and Description |
---|---|
void |
addAnimation(AnimationObject o)
Adds an animation object to show using this timeline
|
boolean |
animate()
Allows the animation to reduce "repaint" calls when it returns false.
|
static Timeline |
createTimeline(int duration,
AnimationObject[] animations,
Dimension size)
Create a new timeline animation
|
protected void |
drawImage(Graphics g,
Object nativeGraphics,
int x,
int y)
Callback invoked internally by LWUIT to draw the image/frame onto the display.
|
AnimationObject |
getAnimation(int i)
Returns the animation object in the given offset
|
AnimationObject |
getAnimationAt(int x,
int y)
Returns the animation object at the given X/Y coordinate in the timeline
for the current frame.
|
int |
getAnimationCount()
Returns the number of animation objects in this timeline
|
int |
getAnimationDelay()
Inidicates the minimal delay between animation frames allowing the CPU to rest.
|
int |
getDuration()
Returns the duration of the entire timeline in milliseconds
|
int |
getHeight()
Returns the height of the image
|
int[] |
getRGB()
Returns the content of this image as a newly created ARGB array.
|
int[] |
getRGBCached()
Returns the content of this image as a newly created ARGB array or a cached
instance if possible.
|
Dimension |
getSize()
Returns the pixel based unscaled dimentions of this timeline
|
int |
getTime()
Returns the time of the timeline
|
int |
getWidth()
Returns the width of the image
|
boolean |
isAnimation()
Returns true if this is an animated image
|
boolean |
isPause()
Returns true when the timeline is paused
|
void |
paint(Graphics g)
Draws the animation, within a component the standard paint method would be
invoked since it bares the exact same signature.
|
void |
paint(Graphics g,
Rectangle rect)
Draws inside the given rectangle clipping area.
|
void |
setAnimationDelay(int animationDelay)
Inidicates the minimal delay between animation frames allowing the CPU to rest.
|
void |
setPause(boolean pause)
Indicate that the application is paused
|
void |
setTime(int time)
Set the time of the timeline
|
applyMask, applyMask, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, getGraphics, getImage, getRGB, getSVGDocument, isAlphaMutableImageSupported, isOpaque, isSVG, isSVGSupported, modifyAlpha, modifyAlpha, modifyAlphaWithTranslucency, rotate, scale, scaled, scaledHeight, scaledSmallerRatio, scaledWidth, subImage, tileRect, toRGB
public int[] getRGB()
Image
public int[] getRGBCached()
Image
getRGBCached
in class Image
public static Timeline createTimeline(int duration, AnimationObject[] animations, Dimension size)
duration
- the duration of the animation in millisecondsanimations
- the animation objects that are part of this timelinesize
- size of the animation in virtual pixels, if the size differs the animation would be
scaled on the flypublic void addAnimation(AnimationObject o)
o
- animation object featured in this timelinepublic void setTime(int time)
time
- the time of the timeline in ms starting from 0public int getTime()
public boolean isAnimation()
Image
isAnimation
in class Image
public boolean animate()
Animation
Display
class.public void paint(Graphics g)
Animation
public void paint(Graphics g, Rectangle rect)
Painter
public int getAnimationDelay()
public void setAnimationDelay(int animationDelay)
animationDelay
- the animationDelay to setprotected void drawImage(Graphics g, Object nativeGraphics, int x, int y)
Image
public int getWidth()
Image
public int getHeight()
Image
public boolean isPause()
public void setPause(boolean pause)
pause
- true to pause the applicationpublic int getDuration()
public Dimension getSize()
public int getAnimationCount()
public AnimationObject getAnimation(int i)
i
- the offset of the animationpublic AnimationObject getAnimationAt(int x, int y)
x
- the x location in the timeliney
- the y location in the timeline