public class SlideTransition extends Object implements Transition
The direction selects the edge the incoming content enters from: RIGHT_TO_LEFT (the
default) enters from the right and pushes the outgoing content off to the left; LEFT_TO_RIGHT does the opposite.
| Modifier and Type | Field and Description |
|---|---|
static int |
LEFT_TO_RIGHT
Direction where the incoming content enters from the left edge and the outgoing content leaves
through the right edge.
|
static int |
RIGHT_TO_LEFT
Direction where the incoming content enters from the right edge and the outgoing content leaves
through the left edge.
|
DEFAULT_DURATION_MILLIS, IMMEDIATE| Constructor and Description |
|---|
SlideTransition()
Creates a right-to-left slide with the default duration.
|
SlideTransition(int direction)
Creates a slide in the given direction with the default duration.
|
SlideTransition(int direction,
int duration)
Creates a slide in the given direction 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 static final int LEFT_TO_RIGHT
public static final int RIGHT_TO_LEFT
public SlideTransition()
public SlideTransition(int direction)
direction - RIGHT_TO_LEFT or LEFT_TO_RIGHT.public SlideTransition(int direction,
int duration)
direction - RIGHT_TO_LEFT or LEFT_TO_RIGHT.duration - the slide 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.