public class FadeTransition extends Object implements Transition
The incoming content's opacity is interpolated linearly from fully transparent to fully opaque over the configured duration, cross-dissolving from the outgoing content.
DEFAULT_DURATION_MILLIS, IMMEDIATE| Constructor and Description |
|---|
FadeTransition()
Creates a fade with the default duration.
|
FadeTransition(int duration)
Creates a fade with the given duration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run(TransitionContext context,
TransitionListener listener)
Animates the page change described by the given context.
|
public FadeTransition()
public FadeTransition(int duration)
duration - the fade duration, in milliseconds; must be strictly positive.IllegalArgumentException - if the given duration is not strictly positive.public void run(TransitionContext context, TransitionListener listener)
Transition
Called on the MicroUI thread once per navigation. The implementation must call
TransitionListener.onTransitionEnd() exactly once when the animation is finished.
run in interface Transitioncontext - the stage exposing the contents, the content area size, and the animation primitives.listener - the listener to notify once, when the transition finishes.