Java Reference
In-Depth Information
The screenshot in Figure 3-2 shows the animation halfway through. In this state both the old node
and the new node are visible.
Figure 3-2. Fade replace in action
Listing 3-3 shows how this transition is implemented.
Listing 3-3. FadeReplace.fx
package org.lj.jfxe.chapter3.example1;
import javafx.scene.Node;
import javafx.animation.*;
import javafx.scene.Group;
import javafx.util.Sequences;
* @author lucasjordan
public function doReplace(nodeToReplace:Node,replacementNode:Node,doAfter:function()):Void{
var parent:Group = (nodeToReplace.parent as Group);
Search WWH ::

Custom Search