Generated Object

Creates a javafx.animation.Timeline instance.

Attributes

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

Content

This node may take one or more at nodes. see 

Usage

Creates a timeline object.

Examples

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;


GroovyFX.start({
    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 )
    tl.play();
});