|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.gwtutils.client.ui.Animation
public abstract class Animation
A convenient method to perform animations.
Field Summary | |
---|---|
static int |
DEFAULT_FPS
The default frame rate. |
Constructor Summary | |
---|---|
Animation(int duration)
Creates a new Animation with the specified duration and
default frame rate. |
|
Animation(int duration,
int fps)
Creates a new Animation with the specified duration (in
milliseconds) and frames per second to display. |
Method Summary | |
---|---|
protected abstract void |
animationEnd()
Invoked after the animation is done. |
protected abstract void |
animationStart()
Invoked before the first frame of the animation is displayed. |
void |
end()
Ends the animation immediately. |
int |
getDuration()
Returns the duration of the animation, in milliseconds. |
double |
getFps()
Returns the number of frames per second this animation displays. |
double |
getHalfSinusoidalProgress()
Returns the half-sinusoidal progression of the animation, i.e. |
double |
getLinearProgress()
Returns the linear progress of the animation, i.e. |
double |
getSinusoidalProgress()
Returns the sinusoidal progression of the animation, i.e. |
boolean |
isRunning()
Returns whether the animation is currently running. |
protected abstract void |
nextFrame()
Displays the next frame of the animation. |
void |
start()
Starts the animation (and returns immediately). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_FPS
Constructor Detail |
---|
public Animation(int duration, int fps)
Animation
with the specified duration (in
milliseconds) and frames per second to display.
public Animation(int duration)
Animation
with the specified duration and
default frame rate.
Method Detail |
---|
public final int getDuration()
public final double getFps()
public void start()
public final boolean isRunning()
true
between the return from start() and until
the return from animationEnd().
public void end()
public final double getLinearProgress()
public final double getSinusoidalProgress()
public final double getHalfSinusoidalProgress()
protected abstract void animationStart()
protected abstract void nextFrame()
get[Type]Progress
methods to determine how far along the
animation is. Note that this method is not guaranteed to get called
because the animation may be ended prematurely.
protected abstract void animationEnd()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |