Top Inners Fields Constructors Methods
org.reactfx.value

pack-priv Class AnimatedVal<T>

extends ValBase<T>
Class Inheritance
Imports
java.time.Duration, java.util.function.BiFunction, javafx.animation.Transition, javafx.beans.value.ObservableValue, org.reactfx.Subscription, org.reactfx.util.Interpolator

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final BiFunction<? super T, ? super T, Duration>
private double
private final Interpolator<T>
private T
private final ObservableValue<T>
private final AnimatedVal<T>.FractionTransition

Constructor Summary

AccessConstructor and Description
pack-priv
AnimatedVal(ObservableValue<T> src, BiFunction<? super T, ? super T, Duration> duration, Interpolator<T> interpolator)

Method Summary

Modifier and TypeMethod and Description
protected T
protected Subscription
connect()

Implements abstract org.reactfx.value.ValBase.connect.

Implementation of this method should start observing inputs.

Inherited from org.reactfx.value.ValBase:
getValueinvalidatenewObserverobserveInputs

Field Detail

durationback to summary
private final BiFunction<? super T, ? super T, Duration> duration
fractionback to summary
private double fraction
interpolatorback to summary
private final Interpolator<T> interpolator
oldValueback to summary
private T oldValue
srcback to summary
private final ObservableValue<T> src
transitionback to summary
private final AnimatedVal<T>.FractionTransition transition

Constructor Detail

AnimatedValback to summary
pack-priv AnimatedVal(ObservableValue<T> src, BiFunction<? super T, ? super T, Duration> duration, Interpolator<T> interpolator)

Method Detail

computeValueback to summary
protected T computeValue()

Implements abstract org.reactfx.value.ValBase.computeValue.

Annotations
@Override
connectback to summary
protected Subscription connect()

Implements abstract org.reactfx.value.ValBase.connect.

Doc from org.reactfx.value.ValBase.connect.

Implementation of this method should start observing inputs. If the value of this Val may change as a result of input change, the corresponding input observer should call invalidate() to notify observers of this Val. By the time of calling invalidate(), the input observer must have already updated any internal state of this Val, so that a subsequent call to computeValue() returns the current value of this Val.

Annotations
@Override
org.reactfx.value back to summary

private final Class AnimatedVal.FractionTransition

extends Transition
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected void
interpolate(double frac)

Implements abstract javafx.animation.Transition.interpolate.

The method interpolate() has to be provided by implementations of Transition.

pack-priv void
Inherited from javafx.animation.Transition:
getCachedInterpolatorgetInterpolatorgetParentTargetNodeinterpolatorPropertysetInterpolator

Constructor Detail

FractionTransitionback to summary
private FractionTransition()

Method Detail

interpolateback to summary
protected void interpolate(double frac)

Implements abstract javafx.animation.Transition.interpolate.

Doc from javafx.animation.Transition.interpolate.

The method interpolate() has to be provided by implementations of Transition. While a Transition is running, this method is called in every frame. The parameter defines the current position with the animation. At the start, the fraction will be 0.0 and at the end it will be 1.0. How the parameter increases, depends on the interpolator, e.g. if the interpolator is Interpolator#LINEAR, the fraction will increase linear. This method must not be called by the user directly.

Annotations
@Override
setDurationback to summary
pack-priv void setDuration(Duration d)