|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.animations.Transition com.sun.lwuit.animations.CommonTransitions
public final class CommonTransitions
Contains common transition animations including the following:
Instances of this class are created using factory methods.
Field Summary | |
---|---|
static int |
SLIDE_HORIZONTAL
Slide the transition horizontally |
static int |
SLIDE_VERTICAL
Slide the transition vertically |
Method Summary | |
---|---|
boolean |
animate()
Allows the animation to reduce "repaint" calls when it returns false. |
void |
cleanup()
Optional operation to cleanup the garbage left over by a running transition |
Transition |
copy(boolean reverse)
Create a copy of the transition, usually the transition used is a copy. |
static CommonTransitions |
createDialogPulsate()
Creates a dialog pulsate transition |
static CommonTransitions |
createEmpty()
Creates an empty transition that does nothing. |
static CommonTransitions |
createFade(int duration)
Creates a transition for fading a form in while fading out the original form |
static CommonTransitions |
createFastSlide(int type,
boolean forward,
int duration)
Creates a slide transition with the given duration and direction, this differs from the standard slide animation by focusing on speed rather than on minimizing heap usage. |
static CommonTransitions |
createFastSlide(int type,
boolean forward,
int duration,
boolean drawDialogMenu)
Creates a slide transition with the given duration and direction, this differs from the standard slide animation by focusing on speed rather than on minimizing heap usage This method works by creating two images and sliding them which works much faster for all devices however takes up more ram. |
protected Motion |
createMotion(int startOffset,
int dest,
int speed)
This method can be overriden by subclasses to create their own motion object on the fly |
static CommonTransitions |
createSlide(int type,
boolean forward,
int duration)
Creates a slide transition with the given duration and direction |
static CommonTransitions |
createSlide(int type,
boolean forward,
int duration,
boolean drawDialogMenu)
Creates a slide transition with the given duration and direction |
static CommonTransitions |
createSlideFadeTitle(boolean forward,
int duration)
Creates a slide transition for the body of the form that fades the title in while sliding |
static CommonTransitions |
createTimeline(Image animation)
Creates a transition using an animated image object (e.g. timeline object) as an alpha mask between the source/target |
Motion |
getMotion()
Motion represents the physical movement within a transition, it can be replaced by the user to provide a more appropriate physical feel |
void |
initTransition()
Callback thats invoked before a transition begins, the source form may be null for the first form in the application. |
static boolean |
isDefaultLinearMotion()
Indicates whether the motion associated with these transitions by default is linear or spline motion |
boolean |
isLinearMotion()
Indicates whether the motion associated with this transition is linear or spline motion |
void |
paint(Graphics g)
Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature. |
static void |
setDefaultLinearMotion(boolean aDefaultLinearMotion)
Indicates whether the motion associated with these transitions by default is linear or spline motion |
void |
setLinearMotion(boolean linearMotion)
Indicates whether the motion associated with this transition is linear or spline motion |
void |
setMotion(Motion motion)
Motion represents the physical movement within a transition, it can be replaced by the user to provide a more appropriate physical feel |
Methods inherited from class com.sun.lwuit.animations.Transition |
---|
cleanSource, getDestination, getSource, init |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SLIDE_HORIZONTAL
createSlide(int, boolean, int)
,
Constant Field Valuespublic static final int SLIDE_VERTICAL
createSlide(int, boolean, int)
,
Constant Field ValuesMethod Detail |
---|
public static CommonTransitions createEmpty()
public static CommonTransitions createSlideFadeTitle(boolean forward, int duration)
forward
- forward is a boolean value, represent the directions of
switching forms, for example for a horizontally type, true means
horizontally movement to right.duration
- represent the time the transition should take in millisecondpublic static CommonTransitions createDialogPulsate()
public static CommonTransitions createFastSlide(int type, boolean forward, int duration)
type
- type can be either vertically or horizontally, which means
the movement direction of the transitionforward
- forward is a boolean value, represent the directions of
switching forms, for example for a horizontally type, true means
horizontally movement to right.duration
- represent the time the transition should take in millisecond
public static CommonTransitions createSlide(int type, boolean forward, int duration)
type
- type can be either vertically or horizontally, which means
the movement direction of the transitionforward
- forward is a boolean value, represent the directions of
switching forms, for example for a horizontally type, true means
horizontally movement to right.duration
- represent the time the transition should take in millisecond
public static CommonTransitions createSlide(int type, boolean forward, int duration, boolean drawDialogMenu)
type
- type can be either vertically or horizontally, which means
the movement direction of the transitionforward
- forward is a boolean value, represent the directions of
switching forms, for example for a horizontally type, true means
horizontally movement to right.duration
- represent the time the transition should take in milliseconddrawDialogMenu
- indicates that the menu (softkey area) of the dialog
should be kept during a slide transition. This is only relevant for
dialog in/out transitions.
public static CommonTransitions createFastSlide(int type, boolean forward, int duration, boolean drawDialogMenu)
type
- type can be either vertically or horizontally, which means
the movement direction of the transitionforward
- forward is a boolean value, represent the directions of
switching forms, for example for a horizontally type, true means
horizontally movement to right.duration
- represent the time the transition should take in milliseconddrawDialogMenu
- indicates that the menu (softkey area) of the dialog
should be kept during a slide transition. This is only relevant for
dialog in/out transitions.
public static CommonTransitions createFade(int duration)
duration
- represent the time the transition should take in millisecond
public static CommonTransitions createTimeline(Image animation)
animation
- the image object to execute
public void initTransition()
Transition
initTransition
in class Transition
protected Motion createMotion(int startOffset, int dest, int speed)
startOffset
- the start offset for the menudest
- the destination of the motionspeed
- the speed of the motion
public boolean animate()
Animation
Display
class.
animate
in interface Animation
animate
in class Transition
public void paint(Graphics g)
Animation
paint
in interface Animation
paint
in class Transition
g
- graphics contextpublic void cleanup()
Transition
cleanup
in class Transition
public Motion getMotion()
public void setMotion(Motion motion)
motion
- new instance of the motion class that will be used by the transitionpublic Transition copy(boolean reverse)
Transition
copy
in class Transition
reverse
- creates a new transition instance with "reverse" behavior useful
for signifying "back" operations
public boolean isLinearMotion()
public void setLinearMotion(boolean linearMotion)
linearMotion
- the linearMotion to setpublic static boolean isDefaultLinearMotion()
public static void setDefaultLinearMotion(boolean aDefaultLinearMotion)
aDefaultLinearMotion
- the defaultLinearMotion to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |