Class ChartLayoutAnimator

  • All Implemented Interfaces:
    java.util.EventListener, javafx.event.EventHandler<javafx.event.ActionEvent>

    public final class ChartLayoutAnimator
    extends javafx.animation.AnimationTimer
    implements javafx.event.EventHandler<javafx.event.ActionEvent>
    Runs any number of animations of KeyFrames calling requestLayout on the given node for every frame while one of those animations is running.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChartLayoutAnimator​(javafx.scene.Parent nodeToLayout)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object animate​(javafx.animation.Animation animation)
      Play a animation containing the given keyframes.
      java.lang.Object animate​(javafx.animation.KeyFrame... keyFrames)
      Play a animation containing the given keyframes.
      void handle​(long l)  
      void handle​(javafx.event.ActionEvent actionEvent)  
      void stop​(java.lang.Object animationID)
      Stop the animation with the given ID
      • Methods inherited from class javafx.animation.AnimationTimer

        start, stop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChartLayoutAnimator

        public ChartLayoutAnimator​(javafx.scene.Parent nodeToLayout)
    • Method Detail

      • handle

        public void handle​(long l)
        Specified by:
        handle in class javafx.animation.AnimationTimer
      • handle

        public void handle​(javafx.event.ActionEvent actionEvent)
        Specified by:
        handle in interface javafx.event.EventHandler<javafx.event.ActionEvent>
      • stop

        public void stop​(java.lang.Object animationID)
        Stop the animation with the given ID
        Parameters:
        animationID - The id of the animation to stop
      • animate

        public java.lang.Object animate​(javafx.animation.KeyFrame... keyFrames)
        Play a animation containing the given keyframes.
        Parameters:
        keyFrames - The keyframes to animate
        Returns:
        A id reference to the animation that can be used to stop the animation if needed
      • animate

        public java.lang.Object animate​(javafx.animation.Animation animation)
        Play a animation containing the given keyframes.
        Parameters:
        animation - The animation to play
        Returns:
        A id reference to the animation that can be used to stop the animation if needed