code: public static FadeTransition createFadeTransition(final Node node, final double fromValue, final double toValue, final int cycleCount, final double duration) {
          assert node != null;
          
          final FadeTransition fadeTransition = new FadeTransition(Duration.millis(duration), node);
          fadeTransition.setFromValue(fromValue);
          fadeTransition.setToValue(toValue);
          fadeTransition.setCycleCount(cycleCount);
          fadeTransition.setAutoReverse(true);
          return fadeTransition;
      }
docs: Method to create a FadeTransition with several parameters.
  
  @param node the node to which the transition should be applied
  @param fromValue the opacity value from which the transition should start
  @param toValue the opacity value where the transition should end
  @param cycleCount the number of times the animation should be played (use Animation.INDEFINITE for endless)
  @param duration the duration which one animation cycle should take
  @return an instance of the created FadeTransition