Animation: onStart method

Martin Sladecek martin.sladecek at
Fri May 10 00:28:15 PDT 2013

Hi Sebastian,

This is currently not possible. There's a JIRA issue for more 
Animation/Transition events here:, so don't forget to vote 
for it ;-).

Unfortunately, there's no reasonable workaround. One dirty fix might be 
wrapping such animation in a ParallelTransition, with a 0-length 
Timeline before it, putting the code in the it's onFinishedProperty.


On 05/10/2013 09:09 AM, Sebastian Rheinnecker wrote:
> Hello,
> is there something like an onStart property in Animation, just like 
> onFinished? Currently, if I want to do some stuff prior to executing a 
> Transition, for example, I have to do something like
> void playTranisition(){
>   doStuff();
>   doSomeOtherStuff();
> }
> Where as
> transition.onStartPropery().set(new EventHandler<ActionEvent>() {
>       @Override
>       public void handle(ActionEvent event) {
>         doStuff();
>         doSomeOtherStuff();
>       }
> });
> would be far more convenient, since I could use this together with 
> SequentialTransition and ParallelTransition and the like. Currently, I 
> have to set a Handler on the onFinishedProperty of the preceding 
> Transition (which blows up the code and leads to complicated adding 
> and removing the listeners).
> Or am I missing something here?
> Kind regards,
> Sebastian

More information about the openjfx-dev mailing list