Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8101764

Add a setOnStarted method to the Animation class

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • None
    • 7u6
    • javafx

    Description

      I suggest adding a setOnStarted(EventHandler<ActionEvent> actionEvent) method to the Animation class.

      Usually you don't need that, because you can just do your stuff, when you call play() or playFromStart() on the Animation.
      But when you have several Animations within a SequentialTransition, this method can be useful, because you can't really tell, when it will get started.
      Of course you could as well use the setOnFinished method of the previous animation, but then you need to know the order of the sequentialTransition, which might not always be the case.

      Accordingly it *might* also be helpful if you had an event "setOnResumed", if you pause() an Animation and then play it again.
      Maybe even a "setOnPaused" event.

      Attachments

        Issue Links

          Activity

            People

              mheinrichs Michael Heinrichs (Inactive)
              cschudtjfx Christian Schudt (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: