Interface Transition
-
- All Known Implementing Classes:
FadeTransition,SlideTransition
public interface TransitionAnimates the replacement of the outgoing content by the incoming content during a navigation.A transition is a parameterized object, not an enum constant, so an application can configure the shipped transitions (
SlideTransition,FadeTransition) or supply its own. The instant transitionIMMEDIATEperforms no animation and is theNavigator's initial default.run(TransitionContext, TransitionListener)is called on the MicroUI thread after the navigation has been committed. The transition animates using theTransitionContextprimitives and must callTransitionListener.onTransitionEnd()exactly once when it finishes.- Since:
- 0.2.0
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_DURATION_MILLISDefault duration of the shipped animated transitions (FadeTransition,SlideTransition), in milliseconds.static TransitionIMMEDIATEThe instant transition: the incoming content replaces the outgoing content in a single frame.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrun(TransitionContext context, TransitionListener listener)Animates the page change described by the given context.
-
-
-
Field Detail
-
IMMEDIATE
static final Transition IMMEDIATE
The instant transition: the incoming content replaces the outgoing content in a single frame.This is the
Navigator's initial default transition; it reproduces a non-animated page change. It performs no animation and signals completion synchronously, so the outgoing content is detached immediately.
-
DEFAULT_DURATION_MILLIS
static final int DEFAULT_DURATION_MILLIS
Default duration of the shipped animated transitions (FadeTransition,SlideTransition), in milliseconds.- See Also:
- Constant Field Values
-
-
Method Detail
-
run
void run(TransitionContext context, TransitionListener listener)
Animates the page change described by the given context.Called on the MicroUI thread once per navigation. The implementation must call
TransitionListener.onTransitionEnd()exactly once when the animation is finished.- Parameters:
context- the stage exposing the contents, the content area size, and the animation primitives.listener- the listener to notify once, when the transition finishes.
-
-