public class SequenceAnimator extends Object implements WeightedAnimator
Modifier and Type | Class and Description |
---|---|
static class |
SequenceAnimator.AnimatorFraction
Animator fraction of a sequence animator.
|
Constructor and Description |
---|
SequenceAnimator(Animator animator,
long weight)
Constructs the sequence animator from animator.
|
SequenceAnimator(List<WeightedAnimator> animators)
Constructs the sequence animator from list of weighted animators.
|
SequenceAnimator(WeightedAnimator... animators)
Constructs the sequence animator from sequence of weighted animators.
|
Modifier and Type | Method and Description |
---|---|
void |
animate(double fraction)
Changes the state of object with respect current phase of animation.
|
Animator |
getAnimator(int index)
Returns the animator in the sequence.
|
SequenceAnimator.AnimatorFraction |
getAnimatorForFraction(double fraction)
Returns animator with other details for given fraction of the sequence
animator.
|
long |
getWeight()
Returns weight of the animator.
|
public SequenceAnimator(Animator animator, long weight)
animator
- the animator.weight
- the weight of the animator.public SequenceAnimator(WeightedAnimator... animators)
animators
- the sequence of weighted animators.public SequenceAnimator(List<WeightedAnimator> animators)
animators
- the list of weighted animators.public void animate(double fraction)
Animator
public SequenceAnimator.AnimatorFraction getAnimatorForFraction(double fraction)
fraction
- the fraction.public Animator getAnimator(int index)
index
- the index of the animator.public long getWeight()
WeightedAnimator
getWeight
in interface WeightedAnimator
Copyright © 2017. All rights reserved.