|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.animations.AnimationObject
public final class AnimationObject
An animation object is an element within the timeline that has a visibility state for rendering at a given point in time. E.g. the object can be queried of its position and render itself for any time.
Field Summary | |
---|---|
static int |
MOTION_TYPE_LINEAR
Used to define the motion type used when manipulating an animation property |
static int |
MOTION_TYPE_SPLINE
Used to define the motion type used when manipulating an animation property |
Method Summary | |
---|---|
AnimationObject |
copy()
Creates a copy of the given animation object |
static AnimationObject |
createAnimationImage(Image img,
int x,
int y)
Creates an animation object instance that can define the animation properties for an image |
static AnimationObject |
createAnimationImage(java.lang.String imageName,
Resources res,
int x,
int y)
Creates an animation object instance that can define the animation properties for an image. |
void |
defineFrames(int frameWidth,
int frameHeight,
int frameDelay)
Defines the frames of the animation if this is a frame changing animation (e.g. |
void |
defineHeight(int motionType,
int startTime,
int duration,
int start,
int end)
Defines the height of the object starting at the given time/value and ending at the given position |
void |
defineMotionX(int motionType,
int startTime,
int duration,
int start,
int end)
Defines a motion on the x axis starting at the given time/value and ending at the given position |
void |
defineMotionY(int motionType,
int startTime,
int duration,
int start,
int end)
Defines a motion on the y axis starting at the given time/value and ending at the given position |
void |
defineOpacity(int motionType,
int startTime,
int duration,
int start,
int end)
Defines opacity (translucency) starting at the given time/value and ending at the given position. |
void |
defineOrientation(int motionType,
int startTime,
int duration,
int start,
int end)
Defines a rotation animation starting at the given time/value and ending at the given position |
void |
defineWidth(int motionType,
int startTime,
int duration,
int start,
int end)
Defines the width of the object starting at the given time/value and ending at the given position |
int |
getEndTime()
The end time of the animation determines when we finish actually drawing the animation object. -1 means the duration of the entire animation. |
int |
getStartTime()
The start time of the animation determines when we start actually drawing the animation object. -1 means the duration of the entire animation. |
void |
setEndTime(int endTime)
The end time of the animation determines when we finish actually drawing the animation object. -1 means the duration of the entire animation. |
void |
setStartTime(int startTime)
The start time of the animation determines when we start actually drawing the animation object. -1 means the duration of the entire animation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MOTION_TYPE_SPLINE
public static final int MOTION_TYPE_LINEAR
Method Detail |
---|
public AnimationObject copy()
public static AnimationObject createAnimationImage(Image img, int x, int y)
img
- the image to animate within the timelinex
- position of the animationy
- position of the animation
public void defineFrames(int frameWidth, int frameHeight, int frameDelay)
frameWidth
- the width of the frame within the image objectframeHeight
- the height of the frame within the image objectframeDelay
- the delay of the framepublic static AnimationObject createAnimationImage(java.lang.String imageName, Resources res, int x, int y)
imageName
- the image to animate within the timelineres
- the resources file from which the image should be fetched.x
- position of the animationy
- position of the animation
public void defineMotionX(int motionType, int startTime, int duration, int start, int end)
motionType
- the type of the motion (spline/linear)startTime
- the start time for the motion within the timeline timeframeduration
- the duration of the motionstart
- the starting position (the value before startTime)end
- the ending position for the property (the value after endTime)public void defineMotionY(int motionType, int startTime, int duration, int start, int end)
motionType
- the type of the motion (spline/linear)startTime
- the start time for the motion within the timeline timeframeduration
- the duration of the motionstart
- the starting position (the value before startTime)end
- the ending position for the property (the value after endTime)public void defineOrientation(int motionType, int startTime, int duration, int start, int end)
motionType
- the type of the motion (spline/linear)startTime
- the start time for the motion within the timeline timeframeduration
- the duration of the motionstart
- the starting position (the value before startTime)end
- the ending position for the property (the value after endTime)public void defineOpacity(int motionType, int startTime, int duration, int start, int end)
motionType
- the type of the motion (spline/linear)startTime
- the start time for the motion within the timeline timeframeduration
- the duration of the motionstart
- the starting position (the value before startTime)end
- the ending position for the property (the value after endTime)public void defineWidth(int motionType, int startTime, int duration, int start, int end)
motionType
- the type of the motion (spline/linear)startTime
- the start time for the motion within the timeline timeframeduration
- the duration of the motionstart
- the starting position (the value before startTime)end
- the ending position for the property (the value after endTime)public void defineHeight(int motionType, int startTime, int duration, int start, int end)
motionType
- the type of the motion (spline/linear)startTime
- the start time for the motion within the timeline timeframeduration
- the duration of the motionstart
- the starting position (the value before startTime)end
- the ending position for the property (the value after endTime)public int getStartTime()
public void setStartTime(int startTime)
startTime
- the startTime to setpublic int getEndTime()
public void setEndTime(int endTime)
endTime
- the endTime to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |