| java.lang.Object com.jgoodies.animation.AbstractAnimation
All known Subclasses: com.jgoodies.animation.animations.FanAnimation, com.jgoodies.animation.animations.BasicTextAnimation, com.jgoodies.animation.animations.GlyphAnimation,
AbstractAnimation | abstract public class AbstractAnimation implements Animation(Code) | | An abstract class that minimizes the effort required to implement
the
Animation interface. Defines the duration and freezed state
and provides a listener list.
author: Karsten Lentzsch version: $Revision: 1.1 $ |
Constructor Summary | |
protected | AbstractAnimation(long duration) Constructs an Animation with the specified duration. | protected | AbstractAnimation(long duration, boolean freezed) Constructs an Animation with the specified duration
and freezed mode. |
Method Summary | |
final public void | addAnimationListener(AnimationListener listener) Adds an AnimationListener to this animation. | public void | animate(long time) Performs the animation at the given time: applies the animation
effect to the animation target, fires appropriate events,
and resets the effect if we exceeded the animations duration. | abstract protected void | applyEffect(long time) Applies the animation effect for the given time to the animation target. | final public long | duration() Returns this animation's duration. | final protected void | fireAnimationStarted(long time) Fires an event that indicates that the animation has been started
at the specified time. | final protected void | fireAnimationStopped(long time) Fires an event that indicates that the animation has been stopped
at the specified time. | final public boolean | isFreezed() Answers whether the animation effect should be freezed after
we exceeded the animation's duration. | final public void | removeAnimationListener(AnimationListener listener) Removes an AnimationListener to this animation. | public String | toString() Returns a string representation for this animation. |
AbstractAnimation | protected AbstractAnimation(long duration)(Code) | | Constructs an Animation with the specified duration.
Parameters: duration - the animation's duration |
AbstractAnimation | protected AbstractAnimation(long duration, boolean freezed)(Code) | | Constructs an Animation with the specified duration
and freezed mode.
Parameters: duration - the animation's duration Parameters: freezed - true indicates that the effect will be retained afterthe animation is finished, false resets the effect to the time 0 |
addAnimationListener | final public void addAnimationListener(AnimationListener listener)(Code) | | Adds an AnimationListener to this animation.
Parameters: listener - the AnimationListener to add |
animate | public void animate(long time)(Code) | | Performs the animation at the given time: applies the animation
effect to the animation target, fires appropriate events,
and resets the effect if we exceeded the animations duration.
Parameters: time - the time used to determine the animation effect |
applyEffect | abstract protected void applyEffect(long time)(Code) | | Applies the animation effect for the given time to the animation target.
Parameters: time - the time used to determine the animation effect |
duration | final public long duration()(Code) | | Returns this animation's duration.
this animation's duration |
fireAnimationStarted | final protected void fireAnimationStarted(long time)(Code) | | Fires an event that indicates that the animation has been started
at the specified time.
Parameters: time - the time that will be reported in the event |
fireAnimationStopped | final protected void fireAnimationStopped(long time)(Code) | | Fires an event that indicates that the animation has been stopped
at the specified time.
Parameters: time - the time that will be reported in the event |
isFreezed | final public boolean isFreezed()(Code) | | Answers whether the animation effect should be freezed after
we exceeded the animation's duration. If this is not the case,
the animation effect of time 0 will be set.
true indicates that the effect will be retained if the animation duration exceeded; false indicates that the effect will be reset |
removeAnimationListener | final public void removeAnimationListener(AnimationListener listener)(Code) | | Removes an AnimationListener to this animation.
Parameters: listener - the AnimationListener to remove |
toString | public String toString()(Code) | | Returns a string representation for this animation.
a string representation for this animation |
|
|