|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.lwuit.animations.Transition
public abstract class Transition
Represents a transition animation between two forms this class is used
internally by DTVContainer
to play an animation when
moving from one form to the next. A transition can be installed on a
Form
object using the in/out transitions, for ease of
use LookAndFeel
has support for default transitions.
Field Summary |
---|
Fields inherited from interface com.sun.dtv.ui.Animated |
---|
ALTERNATING, LOOP, REPEATING |
Constructor Summary | |
---|---|
Transition()
|
Method Summary | |
---|---|
abstract 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. |
abstract Transition |
copy()
Copies a transitions. |
int |
getAnimationMode()
Obtains the animation mode for this animation. |
int |
getDelay()
Obtains the delay after every image for this animation when running. |
Component |
getDestination()
Returns the destination form that should be set once animation is completed. |
int |
getPosition()
Obtains the current position the animation is at the point of time of th method call. |
int |
getRepetitionMode()
Returns the repetition mode of this animation in form of a number. |
Component |
getSource()
Returns the source form which is the form from which the animation is starting. |
void |
init(Component source,
Component destination)
Invoked to set the source and destination forms. |
void |
initTransition()
Callback thats invoked before a transition begins, the source form may be null for the first form in the application. |
boolean |
isRunning()
Obtains the running mode of an animation. |
void |
jumpTo(int position)
Forces an animation to jump to the position indicated by the parameter. |
abstract 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 |
setAnimationMode(int mode)
Sets the animation mode for this animation. |
void |
setDelay(int n)
Determines the delay after every image when running this animation. |
void |
setRepetitionMode(int n)
Determines how often the animation is repeated once it has been started. |
void |
start()
Starts an animation. |
void |
stop()
Stops an animation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transition()
Method Detail |
---|
public final void init(Component source, Component destination)
source
- the source form from which the transition originatesdestination
- the destination form to which the transition will leadpublic void initTransition()
public final Component getDestination()
public final Component getSource()
public void cleanup()
public abstract Transition copy()
public abstract boolean animate()
Animation
animate
in interface Animation
public abstract void paint(Graphics g)
Animation
paint
in interface Animation
public void start()
start()
causes a restart of the animation.
start
in interface Animated
public void stop()
stop()
has no effect.
stop
in interface Animated
public boolean isRunning()
isRunning
in interface Animated
public void jumpTo(int position)
jumpTo
in interface Animated
position
- the index in the row of images building the animation to which
the animation is forced to jumppublic int getPosition()
getPosition
in interface Animated
public void setRepetitionMode(int n)
setRepetitionMode
in interface Animated
n
- number of repetitions to be determined. This can be any number
larger than zero or LOOP
alternatively.
LOOP means that the animation runs in an endless loop until the stop()
method has been called.getRepetitionMode()
public int getRepetitionMode()
getRepetitionMode
in interface Animated
LOOP
which means the animation runs in an
endless loop until the stop()
method has
been called.setRepetitionMode(int)
public void setDelay(int n)
setDelay
in interface Animated
n
- delay in millisecondsgetDelay()
public int getDelay()
getDelay
in interface Animated
setDelay(int)
public void setAnimationMode(int mode)
setAnimationMode
in interface Animated
mode
- the animation mode. Possible values are: REPEATING
and ALTERNATING
.getAnimationMode()
public int getAnimationMode()
getAnimationMode
in interface Animated
REPEATING
and ALTERNATING
.setAnimationMode(int)
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |