java.lang.Object
javafx.animation.Animation
javafx.animation.Transition
io.github.palexdev.materialfx.effects.ConsumerTransition
A simple implementation of
Transition that allows to specify
what to do when the interpolate(double) method is called by using
a Consumer.-
Property Summary
Properties inherited from class javafx.animation.Transition
interpolatorProperties inherited from class javafx.animation.Animation
autoReverse, currentRate, currentTime, cycleCount, cycleDuration, delay, onFinished, rate, status, totalDuration -
Nested Class Summary
Nested classes/interfaces inherited from class javafx.animation.Animation
Animation.Status -
Field Summary
Fields inherited from class javafx.animation.Animation
INDEFINITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinterpolate(double frac) static ConsumerTransitionCreates a newConsumerTransitionwith the given consumer.static ConsumerTransitionCreates a newConsumerTransitionwith the given consumer and duration in milliseconds.static ConsumerTransitionof(Consumer<Double> interpolateConsumer, double duration, Interpolators interpolator) Creates a newConsumerTransitionwith the given consumer, duration in milliseconds and interpolator.static ConsumerTransitionof(Consumer<Double> interpolateConsumer, double duration, Interpolator interpolator) Creates a newConsumerTransitionwith the given consumer, duration in milliseconds and interpolator.static ConsumerTransitionCreates a newConsumerTransitionwith the given consumer and duration.static ConsumerTransitionof(Consumer<Double> interpolateConsumer, Duration duration, Interpolators interpolator) Creates a newConsumerTransitionwith the given consumer, duration and interpolator.static ConsumerTransitionof(Consumer<Double> interpolateConsumer, Duration duration, Interpolator interpolator) Creates a newConsumerTransitionwith the given consumer, duration and interpolator.voidplayWithConsumer(Consumer<Double> interpolateConsumer) CallssetInterpolateConsumer(Consumer)and then starts the animation.setDelayFluent(Duration duration) Sets the transition's delay.setDuration(double millis) Sets the transition duration in milliseconds.setDuration(Duration duration) Sets the transition duration.setInterpolateConsumer(Consumer<Double> interpolateConsumer) Sets the consumer used by theinterpolate(double)method.setInterpolatorFluent(Interpolators interpolator) setInterpolatorFluent(Interpolator interpolator) Sets the transition's interpolator.setOnFinishedFluent(EventHandler<ActionEvent> handler) Methods inherited from class javafx.animation.Transition
getCachedInterpolator, getInterpolator, getParentTargetNode, interpolatorProperty, setInterpolatorMethods inherited from class javafx.animation.Animation
autoReverseProperty, currentRateProperty, currentTimeProperty, cycleCountProperty, cycleDurationProperty, delayProperty, getCuePoints, getCurrentRate, getCurrentTime, getCycleCount, getCycleDuration, getDelay, getOnFinished, getRate, getStatus, getTargetFramerate, getTotalDuration, isAutoReverse, jumpTo, jumpTo, onFinishedProperty, pause, play, playFrom, playFrom, playFromStart, rateProperty, setAutoReverse, setCycleCount, setCycleDuration, setDelay, setOnFinished, setRate, setStatus, statusProperty, stop, totalDurationProperty
-
Constructor Details
-
ConsumerTransition
public ConsumerTransition()
-
-
Method Details
-
setDuration
Sets the transition duration. -
setDuration
Sets the transition duration in milliseconds. -
setInterpolateConsumer
Sets the consumer used by theinterpolate(double)method. -
setInterpolatorFluent
Sets the transition's interpolator. -
setInterpolatorFluent
-
setDelayFluent
Sets the transition's delay. -
setOnFinishedFluent
-
playWithConsumer
CallssetInterpolateConsumer(Consumer)and then starts the animation. -
interpolate
protected void interpolate(double frac) Implementation to make use of aConsumer.- Specified by:
interpolatein classTransition
-
of
Creates a newConsumerTransitionwith the given consumer. -
of
Creates a newConsumerTransitionwith the given consumer and duration. -
of
Creates a newConsumerTransitionwith the given consumer and duration in milliseconds. -
of
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, Duration duration, Interpolator interpolator) Creates a newConsumerTransitionwith the given consumer, duration and interpolator. -
of
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, double duration, Interpolator interpolator) Creates a newConsumerTransitionwith the given consumer, duration in milliseconds and interpolator. -
of
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, Duration duration, Interpolators interpolator) Creates a newConsumerTransitionwith the given consumer, duration and interpolator. -
of
public static ConsumerTransition of(Consumer<Double> interpolateConsumer, double duration, Interpolators interpolator) Creates a newConsumerTransitionwith the given consumer, duration in milliseconds and interpolator.
-