Package javafx.animation

Examples of javafx.animation.Timeline


        } else {
            interpolator = Interpolator.EASE_OUT;
            duration = ANIM_OUT_DURATION;
        }
        KeyFrame kf = new KeyFrame(duration, new KeyValue(bar.prefHeightProperty(), target, interpolator));
        timeline = new Timeline(kf);
        timeline.setOnFinished(x -> timeline = null);
        timeline.play();
    }
View Full Code Here


cube.setOnMouseMoved(new EventHandler<MouseEvent>(){
@Override
public void handle(final MouseEvent arg0) {

animation = new Timeline();

animation.getKeyFrames().addAll(
new KeyFrame(new Duration(2000),
new KeyValue(cube.rx.angleProperty(),arg0.getY()),
new KeyValue(cube.ry.angleProperty(),-arg0.getX()),
View Full Code Here

    Group blendModeGroup = new Group(new Group(new Rectangle(scene.getWidth(), scene.getHeight(), Color.BLACK), circles), colors);
    colors.setBlendMode(BlendMode.OVERLAY);
    root.getChildren().add(blendModeGroup);

    Timeline timeline = new Timeline();
    for (Node circle : circles.getChildren()) {
      timeline.getKeyFrames().addAll(new KeyFrame(Duration.ZERO, // set
                                    // start
                                    // position
                                    // at 0
          new KeyValue(circle.translateXProperty(), random() * 800), new KeyValue(circle.translateYProperty(), random() * 600)), new KeyFrame(new Duration(40000), // set
                                                                                        // end
                                                                                        // position
                                                                                        // at
                                                                                        // 40s
          new KeyValue(circle.translateXProperty(), random() * 800), new KeyValue(circle.translateYProperty(), random() * 600)));
    }
    // play 40s of animation
    timeline.play();
    return scene;
  }
View Full Code Here

        scene.getWidth(), scene.getHeight(), Color.BLACK), circles),
        colors);
    colors.setBlendMode(BlendMode.OVERLAY);
    root.getChildren().add(blendModeGroup);

    Timeline timeline = new Timeline();
    for (Node circle : circles.getChildren()) {
      timeline.getKeyFrames().addAll(
          new KeyFrame(Duration.ZERO, // set start position at 0
              new KeyValue(circle.translateXProperty(),
                  random() * 800),
              new KeyValue(circle.translateYProperty(),
                  random() * 600)),
          new KeyFrame(new Duration(40000), // set end position at 40s
              new KeyValue(circle.translateXProperty(),
                  random() * 800), new KeyValue(circle
                  .translateYProperty(), random() * 600)));
    }
    // play 40s of animation
    timeline.play();
   
    primaryStage.setTitle("Hello OSGi World");
    primaryStage.show();
 
View Full Code Here

    private BooleanProperty flashProperty;
    private Timeline flashTimeline;
   
    public LineCell() {
      flashProperty = new SimpleBooleanProperty(this,"flash",false);
      flashTimeline = new Timeline();
      flashTimeline.setCycleCount(Timeline.INDEFINITE);
     
      EventHandler<ActionEvent> startEvent = new EventHandler<ActionEvent>() {
       
        @Override
View Full Code Here

TOP

Related Classes of javafx.animation.Timeline

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.