public interface IAnimationCallback
This can be used in Animator.animate(IAnimationCallback, java.time.Duration, com.yworks.yfiles.utils.IEventHandler)
as a simpler alternative to implementing
IAnimation
. The interface offers more flexibility for reusable animations as well as lifecycle management
(IAnimation.initialize()
, IAnimation.cleanup()
) and a preferred duration. But if the intent is to just
run a simple one-off animation, IAnimationCallback
is a useful alternative.
IAnimation
,
Animator
Modifier and Type | Method and Description |
---|---|
void |
animate(double time)
A simple callback method for animations.
|
void animate(double time)
This can be used in Animator.animate(IAnimationCallback, java.time.Duration, com.yworks.yfiles.utils.IEventHandler)
as a simpler alternative to implementing
IAnimation
. The interface offers more flexibility for reusable animations as well as
lifecycle management (IAnimation.initialize()
,
IAnimation.cleanup()
) and a preferred duration. But if the intent is to just run a
simple one-off animation, IAnimationCallback
is a useful alternative.
time
- The current (relative) animation time which is a double between 0.0 for the start of the animation and 1.0 for the end
of the animation.IAnimation
,
Animator