public void startBackgroundIconRotateAnimation ( final double fromAngle , final double toAngle , final int cycleCount , final double duration , final Interpolator interpolator , final boolean autoReverse ) { stopBackgroundIconRotateAnimation ( ) ; backgroundRotateAnimation = Animations . createRotateTransition ( backgroundIcon , fromAngle , toAngle , cycleCount , duration , interpolator , autoReverse ) ; backgroundRotateAnimation . setOnFinished ( event -> backgroundIcon . setRotate ( 0 ) ) ; backgroundRotateAnimation . play ( ) ; }
Method starts the rotate animation of the background icon .