Package com.jgoodies.animation
Class Animations
- java.lang.Object
-
- com.jgoodies.animation.Animations
-
public final class Animations extends java.lang.Object
This class consists only of static methods that either operate on animations or create useful standard animations.- Version:
- $Revision: 1.8 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Animations.OffsetAnimation
Helper class that wraps an animation to give it a time offset.static class
Animations.OneTimeAnimation
Used to apply an effect one-time only.private static class
Animations.ParallelAnimation
Helper class to parallelize animations.private static class
Animations.PauseAnimation
Helper class for a pause, an animation, that has no effect.private static class
Animations.RepeatedAnimation
Helper class to repeat an animation.private static class
Animations.ReversedAnimation
Helper class to reverse an animation over the time.private static class
Animations.SequencedAnimation
Helper class to create a sequence of animations.
-
Constructor Summary
Constructors Modifier Constructor Description private
Animations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Animation
offset(Animation animation, long beginTime)
Creates and returns an animation that is defined by a given animation and offset; the resulting animation applies the original effect shifted in time.static Animation
parallel(Animation... animations)
Creates and returns a parallel time container for the given animations, that is an animation that applies the effect of the given animations at the same time.static Animation
parallel(java.util.List<Animation> animations)
Creates and returns a parallel time container, that is an animation that applies the effect of the given animations all at the same time.static Animation
pause(long duration)
Creates and returns a pausing animation that has no effect but a duration.static Animation
repeat(Animation animation, float repeatCount)
Creates and returns an animation that is defined by repeating the given animation.static Animation
repeat(Animation animation, long duration)
Creates and returns an animation that is defined by repeating the given animation for the given duration.static Animation
reverse(Animation animation)
Creates and returns an animation that is defined by reverting the given animation over the time.static Animation
sequential(Animation... animations)
Creates and returns a sequenced time container that is an animation, that concatenates the given array of animations over the time.static Animation
sequential(java.util.List<Animation> animations)
Creates and returns a sequenced time container that is an animation, that concatenates the given list of animations over the time.
-
-
-
Method Detail
-
offset
public static Animation offset(Animation animation, long beginTime)
Creates and returns an animation that is defined by a given animation and offset; the resulting animation applies the original effect shifted in time.- Parameters:
animation
- the animation to shiftbeginTime
- the time to begin the shifted animation- Returns:
- the shifted animation
-
parallel
public static Animation parallel(java.util.List<Animation> animations)
Creates and returns a parallel time container, that is an animation that applies the effect of the given animations all at the same time.- Parameters:
animations
- aList
of animations- Returns:
- a parallel time container for the given animations
-
parallel
public static Animation parallel(Animation... animations)
Creates and returns a parallel time container for the given animations, that is an animation that applies the effect of the given animations at the same time.- Parameters:
animations
- the animations to be parallized- Returns:
- the parallelized animation
-
pause
public static Animation pause(long duration)
Creates and returns a pausing animation that has no effect but a duration. It is useful in combination with sequenced and parallel time containers.- Parameters:
duration
- the pause duration- Returns:
- an animation that has no effect
-
repeat
public static Animation repeat(Animation animation, float repeatCount)
Creates and returns an animation that is defined by repeating the given animation. The result's duration is the duration times repeatCount.- Parameters:
animation
- the animation to repeatrepeatCount
- the number of repetitions- Returns:
- the repeated animation
-
repeat
public static Animation repeat(Animation animation, long duration)
Creates and returns an animation that is defined by repeating the given animation for the given duration.- Parameters:
animation
- the animation to repeatduration
- the duration of the repeated animation- Returns:
- the repeated animation
-
reverse
public static Animation reverse(Animation animation)
Creates and returns an animation that is defined by reverting the given animation over the time.- Parameters:
animation
- the animation to reverse- Returns:
- the reversed animation
-
sequential
public static Animation sequential(java.util.List<Animation> animations)
Creates and returns a sequenced time container that is an animation, that concatenates the given list of animations over the time.- Parameters:
animations
- aList
of animations- Returns:
- the sequenced animation
-
-