package authoring.fluidmotion;

import javafx.animation.Animation;
import javafx.animation.FadeTransition;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.util.Duration;

public class FadeTransitionsWizard {
	public static Animation fadeOut(Node node,int timeDuration,  int initVal, int endVal, int cycleNo, EventHandler<ActionEvent> onFinished){
		FadeTransition ft = new FadeTransition(Duration.millis(timeDuration),node);
		 ft.setFromValue(1);;
	     ft.setToValue(0);;
	     ft.setCycleCount(1);
	     ft.play();
	     ft.setOnFinished(onFinished);
		return ft;
	}
}

@@ -332,16 +332,21 @@
 ation,  
+%0D%0A%09%09%09
 int init
@@ -441,12 +441,12 @@
 t = 
-new 
+init
 Fade
@@ -459,43 +459,340 @@
 tion
-(Duration.millis(timeDuration),node
+Object(node, timeDuration, onFinished);%0D%0A%09%09 ft.setFromValue(1);%0D%0A%09     ft.setToValue(0);%0D%0A%09%09return ft;%0D%0A%09%7D%0D%0A%09%0D%0A%09public static Animation fadeIn(Node node,int timeDuration,  %0D%0A%09%09%09int initVal, int endVal, int cycleNo, EventHandler%3CActionEvent%3E onFinished)%7B%0D%0A%09%09FadeTransition ft = initFadeTransitionObject(node, timeDuration, onFinished
 );%0D%0A
@@ -810,19 +810,18 @@
 omValue(
-1);
+0)
 ;%0D%0A%09    
@@ -835,19 +835,247 @@
 ToValue(
-0
+1
 );
+%0D%0A%09%09return ft;%0D%0A%09%7D%0D%0A%0D%0A%09private static FadeTransition initFadeTransitionObject(Node node, int timeDuration,%0D%0A%09%09%09EventHandler%3CActionEvent%3E onFinished) %7B%0D%0A%09%09FadeTransition ft = new FadeTransition(Duration.millis(timeDuration),node)
 ;%0D%0A%09    

Update FadeIn effect