If you create a reusable UI parent component which is capable of animating a number of contained child components, you might add a transition property, which would allow others to choose which transition is used for animating the child components.
This means the parent component would have to do something like
transition.setNode(child);
transition.play();
Luckily, there is a setNode method found in FadeTransition, ScaleTransition, etc. However, this setNode method is not defined in the Transition superclass, so this means you end up writing ugly code like
if(transition instanceof FadeTransition)
((FadeTransition) transition).setNode(child);
else if(transition instanceof ...)
...
I hereby request that the method is added to Transition (if possible) or that at least some other common interface is introduced.
This means the parent component would have to do something like
transition.setNode(child);
transition.play();
Luckily, there is a setNode method found in FadeTransition, ScaleTransition, etc. However, this setNode method is not defined in the Transition superclass, so this means you end up writing ugly code like
if(transition instanceof FadeTransition)
((FadeTransition) transition).setNode(child);
else if(transition instanceof ...)
...
I hereby request that the method is added to Transition (if possible) or that at least some other common interface is introduced.