public void startBackgroundIconColorFadeAnimation ( final int cycleCount ) { if ( backgroundIcon == null ) { LOGGER . warn ( "Background animation skipped because background icon not set!" ) ; return ; } backgroundIconColorFadeAnimation = Animations . createFadeTransition ( backgroundIcon , JFXConstants . TRANSPARENCY_FULLY , JFXConstants . TRANSPARENCY_NONE , cycleCount , JFXConstants . ANIMATION_DURATION_FADE_SLOW ) ; backgroundIconColorFadeAnimation . setOnFinished ( event -> backgroundIcon . setOpacity ( JFXConstants . TRANSPARENCY_FULLY ) ) ; backgroundIconColorFadeAnimation . play ( ) ; }
Method starts the fade animation of the background icon color .