public class Animation extends Object
Constructor and Description |
---|
Animation(long duration,
Animator animator)
Constructs animation.
|
Modifier and Type | Method and Description |
---|---|
Animator |
getAnimator()
Returns the animator of the animation.
|
long |
getDuration()
Returns duration of the animation.
|
Runnable |
getFinalizer()
Returns the code executed when the animation is completed.
|
boolean |
isCompleted()
Returns whether the animation has been completed.
|
boolean |
isStarted()
Returns whether the animation has been started.
|
void |
setFinalizer(Runnable finalizer)
Set
Runnable that is asynchronously executed when the animation
is completed. |
void |
start()
Starts the animation.
|
void |
startAndWait()
Starts the animation and waits for its completion.
|
void |
stop()
Stops the animation.
|
void |
waitForCompletion()
Waits for completion of animation.
|
public Animation(long duration, Animator animator)
duration
- the duration of animation in milliseconds.animator
- the animator.public long getDuration()
public Animator getAnimator()
public void setFinalizer(Runnable finalizer)
Runnable
that is asynchronously executed when the animation
is completed.finalizer
- the desired finalizer.public Runnable getFinalizer()
Runnable
public void start()
public void stop()
public boolean isCompleted()
public boolean isStarted()
public void waitForCompletion()
public void startAndWait()
Copyright © 2017. All rights reserved.