public abstract class Transition extends Object
TransitionSet
s and Transition.TransitionUnit
s can be composed with each other. It's
abstract because before Java 8, static methods on interfaces are not allowed.Modifier and Type | Class and Description |
---|---|
static class |
Transition.AnimationTarget
Specifies what components and properties a Transition should target.
|
static class |
Transition.AutoBoundsTransitionBuilder
Transition builder that targets every component in the component tree whose bounds have been
changed.
|
static class |
Transition.BaseTransitionUnitsBuilder |
static class |
Transition.ComponentTarget
Specifies the component(s) a Transition should target.
|
static class |
Transition.PropertyTarget
Specifies the property(s) a Transition should target.
|
static class |
Transition.SpringTransitionAnimator
Creates spring-driven animations.
|
static class |
Transition.TimingTransitionAnimator
Creates timing-driven animations with the given duration.
|
static interface |
Transition.TransitionAnimator
Class that knows how to create a
TransitionAnimationBinding given a
PropertyAnimation . |
static class |
Transition.TransitionUnit |
static class |
Transition.TransitionUnitsBuilder
Transition builder that allows targeting arbitrary keys and properties.
|
Modifier and Type | Field and Description |
---|---|
static Transition.TransitionAnimator |
SPRING_WITH_OVERSHOOT
Spring-driven animator with values of
SpringConfig.DEFAULT_TENSION and SpringConfig.DEFAULT_FRICTION that has overshooting behavior. |
static Transition.TransitionAnimator |
SPRING_WITHOUT_OVERSHOOT
Spring-driven animator that can be used as alternative to
SPRING_WITH_OVERSHOOT if
overshoot is not desired. |
Constructor and Description |
---|
Transition() |
Modifier and Type | Method and Description |
---|---|
static Transition.AutoBoundsTransitionBuilder |
allLayout()
Creates an Automatic Bounds Transition that targets every component in the component tree whose
bounds have been changed.
|
static Transition.TransitionUnitsBuilder |
create(String... keys)
Creates a Transition for the components with the given transition keys.
|
static Transition.TransitionUnitsBuilder |
create(String key)
Creates a Transition for the component with the given transition key.
|
static Transition.TransitionUnitsBuilder |
create(Transition.ComponentTarget target)
Creates a Transition for the components targeted by the given
Transition.ComponentTarget . |
static <T extends Transition> |
delay(int delayMs,
T transition)
Creates a delayed
Transition s that will run after a delay. |
static <T extends Transition> |
parallel(T... transitions)
Creates a set of
Transition s that will run in parallel. |
static Transition.TransitionAnimator |
renderThread()
Creates a
RenderThreadTransition that runs on the Render Thread. |
static Transition.TransitionAnimator |
renderThread(int durationMs)
Creates a
RenderThreadTransition with the given duration that runs on the Render
Thread. |
static Transition.TransitionAnimator |
renderThread(int delayMs,
int durationMs)
Creates a
RenderThreadTransition that runs on the Render Thread. |
static Transition.TransitionAnimator |
renderThread(int delayMs,
int durationMs,
Interpolator interpolator)
Creates a
RenderThreadTransition with the given duration, delay and TimeInterpolator that runs on the Render Thread. |
static Transition.TransitionAnimator |
renderThread(int durationMs,
TimeInterpolator interpolator)
Creates a
RenderThreadTransition with the given duration and TimeInterpolator that runs on the Render Thread. |
static <T extends Transition> |
sequence(T... transitions)
Creates a sequence of
Transition s that will run one after another. |
static Transition.TransitionAnimator |
springWithConfig(double tension,
double friction)
Creates a
SpringTransition with the given tension and friction. |
static <T extends Transition> |
stagger(int staggerMs,
T... transitions)
Creates a set of
Transition s that will run in parallel but starting on a stagger. |
static Transition.TransitionAnimator |
timing(int durationMs)
Creates a
TimingTransition with the given duration. |
static Transition.TransitionAnimator |
timing(int durationMs,
Interpolator interpolator)
Creates a
TimingTransition with the given duration and Interpolator . |
public static final Transition.TransitionAnimator SPRING_WITH_OVERSHOOT
SpringConfig.DEFAULT_TENSION
and SpringConfig.DEFAULT_FRICTION
that has overshooting behavior. Spring physics implementation is
taken from Rebound library and we recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public static final Transition.TransitionAnimator SPRING_WITHOUT_OVERSHOOT
SPRING_WITH_OVERSHOOT
if
overshoot is not desired. Spring physics implementation is taken from Rebound library and we
recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public static Transition.TransitionUnitsBuilder create(String key)
public static Transition.TransitionUnitsBuilder create(String... keys)
public static Transition.TransitionUnitsBuilder create(Transition.ComponentTarget target)
Transition.ComponentTarget
.public static Transition.AutoBoundsTransitionBuilder allLayout()
public static <T extends Transition> TransitionSet parallel(T... transitions)
Transition
s that will run in parallel.public static <T extends Transition> TransitionSet stagger(int staggerMs, T... transitions)
Transition
s that will run in parallel but starting on a stagger.public static <T extends Transition> TransitionSet sequence(T... transitions)
Transition
s that will run one after another.public static <T extends Transition> Transition delay(int delayMs, T transition)
Transition
s that will run after a delay.public static Transition.TransitionAnimator springWithConfig(double tension, double friction)
SpringTransition
with the given tension and friction. Spring physics
implementation is taken from Rebound library and we recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public static Transition.TransitionAnimator timing(int durationMs)
TimingTransition
with the given duration.public static Transition.TransitionAnimator timing(int durationMs, Interpolator interpolator)
TimingTransition
with the given duration and Interpolator
.public static Transition.TransitionAnimator renderThread()
RenderThreadTransition
that runs on the Render Thread.public static Transition.TransitionAnimator renderThread(int delayMs, int durationMs)
RenderThreadTransition
that runs on the Render Thread.public static Transition.TransitionAnimator renderThread(int durationMs)
RenderThreadTransition
with the given duration that runs on the Render
Thread.public static Transition.TransitionAnimator renderThread(int durationMs, TimeInterpolator interpolator)
RenderThreadTransition
with the given duration and TimeInterpolator
that runs on the Render Thread.public static Transition.TransitionAnimator renderThread(int delayMs, int durationMs, Interpolator interpolator)
RenderThreadTransition
with the given duration, delay and TimeInterpolator
that runs on the Render Thread. Warning: the delay will be
considered as a part of the animation, you may consider using delay(int,
Transition)
()} instead, but this way the delay will be handled on the UI thread)