Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Generated Object

Creates a javafx.animation.KeyValue instance.


This object takes a either a javafx.beans.WritableValue argument, or takes an object instance and a property name within that instance. These are used as the property to change as a result of the timeline. 


This node takes the attributes defined on the javafx.animation.KeyFrame class. see javafx.animation.KeyFrame

The onFinished attribute may take either a javafx.event.EventHandler object or a groovy closure object. The groovy closure will be called with the javafx.event.Event object as a single argument..


This node must have one "to" node and may have one "tween" node. see 


Creates a timeline KeyValue for a key frame..


Code Block
import groovyx.javafx.TimelineBuilder;
import javafx.animation.Interpolator;
import groovyx.javafx.GroovyFX
import org.codehaus.groovyfx.javafx.binding.PropertyBinding;
import javafx.application.Platform;

x = 5.0;
y = 5.0;

    def tlb = new TimelineBuilder();
    def tl = tlb.timeline(cycleCount: 2, onFinished: { Platform.exit()}) {
        at (10.s,
           onFinished: { println "x = ${this.x}, y = ${this.y}"}
                change (this,"x") {
                    to 2.0
                    tween  "ease_both"
                change (this,"y") {
                    to 125
    println( tl );