public class FlipTransition extends Transition
Constructor and Description |
---|
FlipTransition()
Creates a Flip Transition
|
FlipTransition(int bgColor)
Creates a Flip Transition
|
FlipTransition(int bgColor,
int duration)
Creates a Flip Transition
|
Modifier and Type | Method and Description |
---|---|
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
|
int |
getBgColor()
The background color that is painted behind the flipping effect or -1 to use the paintBackgrounds method instead
|
int |
getDuration()
The duration for the flip transition
|
void |
initTransition()
Callback thats invoked before a transition begins, the source form may be null
for the first form in the application.
|
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 |
setBgColor(int bgColor)
The background color that is painted behind the flipping effect or -1 to use the paintBackgrounds method instead
|
void |
setDuration(int duration)
The duration for the flip transition
|
cleanSource, copy, getDestination, getSource, init
public FlipTransition()
public FlipTransition(int bgColor)
bgColor
- the color to paint in the background when the transition
paints, use -1 to not paint a background colorpublic FlipTransition(int bgColor, int duration)
bgColor
- the color to paint in the background when the transition
paintsduration
- the duration of the transitionpublic void initTransition()
Transition
initTransition
in class Transition
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 int getDuration()
public void setDuration(int duration)
duration
- the duration to setpublic int getBgColor()
public void setBgColor(int bgColor)
bgColor
- the bgColor to set