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 target framerate.
        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 first non-null target Node in the parent hierarchy of this Transition, or null if such a node is not found.

        A parent animation is one that can have child animations. Examples are SequentialTransition and ParallelTransition. A parent animation can also be a child of another parent animation.

        Note that if this Transition has a target node set and is not a parent animation, it will be ignored during the call as this method only queries parent animations.

        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