This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Add 'at' item to the Animation category: at (5s) { value => 20.0 tween Interpolator.LINEAR } In JavaFX code it looks like: ------------------------------------------------------- import javafx.animation.*; var radius = 10.0; Timeline { repeatCount: Timeline.INDEFINITE keyFrames: [ at (5s) { radius => 20.0 tween Interpolator.EASEBOTH } at (15s) { radius => 5.0 tween Interpolator.LINEAR } at (15s) { radius => 5.0 tween Interpolator.EASEIN } ] } -------------------------------------------------------
This should be up to user to use this functionality in code. I don't think it's a good idea to have it in template.
The template: --------------------------------------- at (5s) { value => 20.0 tween Interpolator.LINEAR } --------------------------------------- is just a short version of the KeyFrame template: --------------------------------------- KeyFrame { time: 1s } --------------------------------------- So a user will have the option to use the full version or to use the short one.
Ok I understand but I'm not really familiar with this syntax. Could you provide full template for this component. It'd speed up development time so I don't have to investigate it? Thanks,
The template is: --------------------------------------------------- at (5s) { value => 190.0 tween Interpolator.LINEAR } --------------------------------------------------- See the Source Code: Animated Orange Rectangle in: http://javafx.com/docs/articles/animation_basics/
http://javafx.com/docs/articles/animation_basics/ Source Code: Keyframes Shortcut Using the at() Operator ---------------------------------------------------------- var slider1: Number; Timeline { repeatCount: 1 keyFrames: [ at (0s) {slider1 => 20.0}, //start point at (5s) {slider1 => 100.0 tween Interpolator.LINEAR} //end point ]; //close KeyFrames }.play(); ----------------------------------------------------------
Now I understand but I can see problem with it. We have to use "external" variable to make it work. In case that some one decided to use like this: var timeline = var slider1: Number; Timeline { repeatCount: 1 keyFrames: [ at (0s) {slider1 => 20.0}, //start point at (5s) {slider1 => 100.0 tween Interpolator.LINEAR} //end point ]; //close KeyFrames }.play(); It wont work, any possibility to use this syntax without declaring var?
The same is for the values template in the Animation category: -------------------------------------------------------- values: [ variable => 0.0 tween Interpolator.LINEAR ] -------------------------------------------------------- The code is not compilable until you define the external variable.
changed in main, changeset: http://hg.netbeans.org/javafx/rev/6accc2587608
verified in NetBeans-JavaFX-Soma: #151