Generated Object

Creates a javafx.animation.KeyValue instance.

Value

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. 

Attributes

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..

Content

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

Usage

Creates a timeline KeyValue for a key frame..

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();
});