Class Transition

    • Property Detail

      • interpolator

        public final ObjectProperty<Interpolator> interpolatorProperty
        Controls the timing for acceleration and deceleration at each Transition cycle.

        This may only be changed prior to starting the transition or after the transition has ended. If the value of interpolator is changed for a running Transition, the animation has to be stopped and started again to pick up the new value.

        Default interpolator is set to Interpolator.EASE_BOTH.

        Default value:
        EASE_BOTH
        See Also:
        getInterpolator(), setInterpolator(Interpolator)
    • Constructor Detail

      • Transition

        public Transition​(double targetFramerate)
        The constructor of Transition. This constructor allows to define a Animation.targetFramerate.
        Parameters:
        targetFramerate - The custom target frame rate for this Transition
      • Transition

        public Transition​()
        The constructor of Transition.
    • Method Detail

      • setInterpolator

        public final void setInterpolator​(Interpolator value)
        Sets the value of the property interpolator.
        Property description:
        Controls the timing for acceleration and deceleration at each Transition cycle.

        This may only be changed prior to starting the transition or after the transition has ended. If the value of interpolator is changed for a running Transition, the animation has to be stopped and started again to pick up the new value.

        Default interpolator is set to Interpolator.EASE_BOTH.

        Default value:
        EASE_BOTH
      • getInterpolator

        public final Interpolator getInterpolator​()
        Gets the value of the property interpolator.
        Property description:
        Controls the timing for acceleration and deceleration at each Transition cycle.

        This may only be changed prior to starting the transition or after the transition has ended. If the value of interpolator is changed for a running Transition, the animation has to be stopped and started again to pick up the new value.

        Default interpolator is set to Interpolator.EASE_BOTH.

        Default value:
        EASE_BOTH
      • interpolatorProperty

        public final ObjectProperty<Interpolator> interpolatorProperty​()
        Controls the timing for acceleration and deceleration at each Transition cycle.

        This may only be changed prior to starting the transition or after the transition has ended. If the value of interpolator is changed for a running Transition, the animation has to be stopped and started again to pick up the new value.

        Default interpolator is set to Interpolator.EASE_BOTH.

        Default value:
        EASE_BOTH
        See Also:
        getInterpolator(), setInterpolator(Interpolator)
      • getCachedInterpolator

        protected Interpolator getCachedInterpolator​()
        Returns the Interpolator, that was set when the Transition was started. Changing the interpolator of a running Transition should have no immediate effect. Instead the running Transition should continue to use the original Interpolator until it is stopped and started again.
        Returns:
        the Interpolator that was set when this Transition was started
      • getParentTargetNode

        protected Node getParentTargetNode​()
        Returns the target Node for animation of this Transition. This method returns node if it is set, else returns its parent.getTargetNode() otherwise null.
        Returns:
        the target Node
      • interpolate

        protected abstract void interpolate​(double frac)
        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.
        Parameters:
        frac - The relative position