Package javafx.animation

Examples of javafx.animation.TranslateTransition


  @Override
  public void start(final Stage stage) throws Exception {
    Text text = TextBuilder.create().text("Fooooooo")
        .font(Font.font("Arial", 70)).textOrigin(VPos.TOP).build();
    TranslateTransition transition = TranslateTransitionBuilder.create()
        .duration(Duration.seconds(10)).node(text).toX(800)
        .interpolator(Interpolator.LINEAR).build();
    Scene scene = SceneBuilder.create().width(500).height(250)
        .root(GroupBuilder.create().children(text).build()).build();
    stage.setScene(scene);
    stage.setTitle("hasCode.com - Java FX Samples");
    stage.show();
    transition.play();
  }
View Full Code Here


    text2.setTranslateX(-220);
   
    Group logo = (Group) g.lookup("#logo");
    logo.setOpacity(0);
   
    TranslateTransition tt = new TranslateTransition(new Duration(3000), text2);
    tt.setFromX(-220);
    tt.setToX(0);
   
    FadeTransition ft = new FadeTransition(new Duration(2000), logo);
    ft.setFromValue(0);
    ft.setToValue(1.0);
   
View Full Code Here

      .duration(new Duration(100))
      .fromValue(0.3)
      .toValue(1)
      .build();
   
    TranslateTransition moveA = TranslateTransitionBuilder.create()
      .byX(leftBounds.getMinX()-rightBounds.getMinX())
      .byY(leftBounds.getMinY()-rightBounds.getMinY())
      .duration(new Duration(500))
      .node(right)
      .build();
   
    SequentialTransition a = SequentialTransitionBuilder.create()
      .node(right)
      .children(fadeOut, moveA, fadeIn)
      .build();
   
    TranslateTransition moveB = TranslateTransitionBuilder.create()
        .byX(rightBounds.getMinX()-leftBounds.getMinX())
        .byY(rightBounds.getMinY()-leftBounds.getMinY())
        .duration(new Duration(500))
        .node(left)
        .build();
View Full Code Here

TOP

Related Classes of javafx.animation.TranslateTransition

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.