com.sun.dtv.ui
Interface Animated
- All Known Implementing Classes:
- AnimatedMatte, AWTComponent, Button, Calendar, CheckBox, ComboBox, CommonTransitions, Component, Container, DefaultListCellRenderer, Dialog, DTVContainer, Form, Label, List, MediaComponent, RadioButton, StaticAnimation, TabbedPane, TextArea, TextField, Transition
public interface Animated
This interface provides methods to set and retrieve parameters of an
animation effect.
An animation is always stopped by default and must be started by using the
start
method. Before changing the content
of an animation, the animation must be stopped if it is running at this
point of time.
The default value for the animation position is always the first image, the
one with index 0. The default animation mode is REPEATING
, the default repetition mode is
LOOP
.
Field Summary |
static int |
ALTERNATING
Value for the animation mode. |
static int |
LOOP
Value for the repetition mode. |
static int |
REPEATING
Value for the animation mode. |
Method Summary |
int |
getAnimationMode()
Obtains the animation mode for this animation. |
int |
getDelay()
Obtains the delay after every image for this animation when running. |
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. |
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. |
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. |
REPEATING
static final int REPEATING
- Value for the animation mode. REPEATING means that the animation is
repeated forwards. The number of repetitions depends on the repetition
mode.
- See Also:
- Constant Field Values
ALTERNATING
static final int ALTERNATING
- Value for the animation mode. ALTERNATING means that the animation is
repeated alternating forwards and backwards. The number of repetitions
depends on the repetition mode.
- See Also:
- Constant Field Values
LOOP
static final int LOOP
- Value for the repetition mode. LOOP means that the animation runs in an
endless loop. How exactly the animations runs in this loop, depends on
the animation mode.
- See Also:
- Constant Field Values
start
void start()
- Starts an animation. Please consider that an animation is in the stopped
mode per default, so it has to be started explicitly once it has been
created.
In case the animation is already running, a call to
start()
causes a restart of the animation.
stop
void stop()
- Stops an animation. In case the animation is already stopped, the call to
stop()
has no effect.
isRunning
boolean isRunning()
- Obtains the running mode of an animation. Returns true if the animation
is running, false otherwise.
- Returns:
- true if the animation is running, false otherwise
jumpTo
void jumpTo(int position)
- Forces an animation to jump to the position indicated by the parameter.
An animation can be considered as a row of images, the parameter of this
method provides the index within this row.
If the animation is stopped, a call to this method causes the animation
to show the image at the indicated position, but not to start.
If the animation is running, a call to this method causes the animation
to jump to the image at the indicated position and continue running
immediately.
- Parameters:
position
- the index in the row of images building the animation to which
the animation is forced to jump
getPosition
int getPosition()
- Obtains the current position the animation is at the point of time of
th method call. An animation can be considered as a row of images, this
method provides the index within this row.
- Returns:
- the current position of the image within the row of images
building this animation
setRepetitionMode
void setRepetitionMode(int n)
- Determines how often the animation is repeated once it has been started.
- Parameters:
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.- See Also:
getRepetitionMode()
getRepetitionMode
int getRepetitionMode()
- Returns the repetition mode of this animation in form of a number. The
number reads how many repetitions have been determined for this
animation.
- Returns:
- number of repetitions determined for this animation or
LOOP
which means the animation runs in an
endless loop until the stop()
method has
been called. - See Also:
setRepetitionMode(int)
setDelay
void setDelay(int n)
- Determines the delay after every image when running this animation.
- Parameters:
n
- delay in milliseconds- See Also:
getDelay()
getDelay
int getDelay()
- Obtains the delay after every image for this animation when running.
- Returns:
- the delay in milliseconds
- See Also:
setDelay(int)
setAnimationMode
void setAnimationMode(int mode)
- Sets the animation mode for this animation. The animation mode determines
how the animation is running: always forwards, or forwards and backwards
alternating.
- Parameters:
mode
- the animation mode. Possible values are: REPEATING
and ALTERNATING
.- See Also:
getAnimationMode()
getAnimationMode
int getAnimationMode()
- Obtains the animation mode for this animation. The animation mode
determines how the animation is running: always forwards, or forwards and
backwards alternating.
- Returns:
- the animation mode. Possible values are:
REPEATING
and ALTERNATING
. - See Also:
setAnimationMode(int)
Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.
U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.
DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
Use of this document is subject to license terms.