private void bindUpdates() { final KeyFrame oneFrame = new KeyFrame(Duration.seconds(1), (ActionEvent evt) -> { if (this.batpack != null) { this.batpack = BatteryMonitorSystem.getBatpack(); //System.out.println("layout: battery pack module 5 cell 5 voltage: " + batpack.getModules().get(4).getBatteryCells().get(4).getVoltageAsString()); checkConnection(); updateModules(); updateTotalVoltage(); updateMaxTemperature(); updateCriticalValues(); } }); Timeline timer = TimelineBuilder.create().cycleCount(Animation.INDEFINITE).keyFrames(oneFrame).build(); timer.playFromStart(); }
private void showLoading() { final KeyFrame oneFrame = new KeyFrame(Duration.millis(750), (ActionEvent evt) -> { loading.setText(getNextLoadingText()); //bms.setText(getNextBmsText()); }); Timeline timer = TimelineBuilder.create().cycleCount(Animation.INDEFINITE).keyFrames(oneFrame).build(); timer.playFromStart(); }
/** * Create new FlashTransition * * @param node The node to affect */ public FlashTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE)), new KeyFrame(Duration.millis(250), new KeyValue(node.opacityProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(500), new KeyValue(node.opacityProperty(), 1, WEB_EASE)), new KeyFrame(Duration.millis(750), new KeyValue(node.opacityProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE)) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
public void takeHit() { if (!invincible) { if (!small) { setSmall(); invincible = true; getNode().setOpacity(0.5); TimelineBuilder.create() .keyFrames(new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { invincible = false; getNode().setOpacity(1); } })) .build() .play(); } else { state = new Dead(this); } } }
public void run() { _isRunning = true; final Duration oneFrameAmt = Duration.millis(1000 / _fps); final KeyFrame oneFrame = new KeyFrame(oneFrameAmt, new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { _update(); } } ); _loop = TimelineBuilder.create().cycleCount(Animation.INDEFINITE).keyFrames(oneFrame).build(); play(); }
/** * Create new FlipInXTransition * * @param node The node to affect */ public FlipInXTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.rotateProperty(), -90, WEB_EASE), new KeyValue(node.opacityProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(400), new KeyValue(node.rotateProperty(), 10, WEB_EASE) ), new KeyFrame(Duration.millis(700), new KeyValue(node.rotateProperty(), -10, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.rotateProperty(), 0, WEB_EASE), new KeyValue(node.opacityProperty(), 1, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
/** * Create new ShakeTransition * * @param node The node to affect */ public ShakeTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.translateXProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(100), new KeyValue(node.translateXProperty(), -10, WEB_EASE)), new KeyFrame(Duration.millis(200), new KeyValue(node.translateXProperty(), 10, WEB_EASE)), new KeyFrame(Duration.millis(300), new KeyValue(node.translateXProperty(), -10, WEB_EASE)), new KeyFrame(Duration.millis(400), new KeyValue(node.translateXProperty(), 10, WEB_EASE)), new KeyFrame(Duration.millis(500), new KeyValue(node.translateXProperty(), -10, WEB_EASE)), new KeyFrame(Duration.millis(600), new KeyValue(node.translateXProperty(), 10, WEB_EASE)), new KeyFrame(Duration.millis(700), new KeyValue(node.translateXProperty(), -10, WEB_EASE)), new KeyFrame(Duration.millis(800), new KeyValue(node.translateXProperty(), 10, WEB_EASE)), new KeyFrame(Duration.millis(900), new KeyValue(node.translateXProperty(), -10, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.translateXProperty(), 0, WEB_EASE)) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double startY = -node.localToScene(0, 0).getY() -node.getBoundsInParent().getHeight(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), startY, WEB_EASE) ), new KeyFrame(Duration.millis(600), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 30, WEB_EASE) ), new KeyFrame(Duration.millis(800), new KeyValue(node.translateYProperty(), -10, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ) ) .build(); super.starting(); }
/** * Create new FlipOutXTransition * * @param node The node to affect */ public FlipOutXTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.rotateProperty(), 0, WEB_EASE), new KeyValue(node.opacityProperty(), 1, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.rotateProperty(), -90, WEB_EASE), new KeyValue(node.opacityProperty(), 0, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
/** * Create new RotateOutTransition * * @param node The node to affect */ public RotateOutTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.rotateProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.rotateProperty(), 200, WEB_EASE) ) ) .build()); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double endX = -node.localToScene(0, 0).getX() -node.getBoundsInParent().getWidth(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(200), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 20, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), endX, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { double endX = node.getScene().getWidth() - node.localToScene(0, 0).getX(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), endX, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { double endX = -node.localToScene(0, 0).getX() -node.getBoundsInParent().getWidth(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), endX, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), -90, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0, node.getBoundsInLocal().getWidth(), node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), 90, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0, node.getBoundsInLocal().getWidth(), node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), 90, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
/** * Create new FadeInUpTransition * * @param node The node to affect */ public FadeInUpTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), 20, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0, node.getBoundsInLocal().getWidth(), node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), -90, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0, node.getBoundsInLocal().getWidth(), node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), -90, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
/** * Create new PulseTransition * * @param node The node to affect */ public PulseTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.scaleXProperty(), 1, WEB_EASE), new KeyValue(node.scaleYProperty(), 1, WEB_EASE) ), new KeyFrame(Duration.millis(500), new KeyValue(node.scaleXProperty(), 1.1, WEB_EASE), new KeyValue(node.scaleYProperty(), 1.1, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.scaleXProperty(), 1, WEB_EASE), new KeyValue(node.scaleYProperty(), 1, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double startX = node.getScene().getWidth() - node.localToScene(0, 0).getX(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), startX, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ) ) .build(); super.starting(); }
/** * Create new FadeOutUpTransition * * @param node The node to affect */ public FadeOutUpTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), -20, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
/** * Create new FadeInLeftTransition * * @param node The node to affect */ public FadeInLeftTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), -20, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double endY = -node.localToScene(0, 0).getY() -node.getBoundsInParent().getHeight(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(200), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 20, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), endY, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { double startY = node.getScene().getHeight() - node.localToScene(0, 0).getY(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), startY, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ) ) .build(); super.starting(); }
/** * Create new FadeOutLeftTransition * * @param node The node to affect */ public FadeOutLeftTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), -20, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double startY = node.getScene().getHeight() - node.localToScene(0, 0).getY(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), startY, WEB_EASE) ), new KeyFrame(Duration.millis(600), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), -30, WEB_EASE) ), new KeyFrame(Duration.millis(800), new KeyValue(node.translateYProperty(), 10, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), -90, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
/** * Create new FlipOutYTransition * * @param node The node to affect */ public FlipOutYTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.rotateProperty(), 0, WEB_EASE), new KeyValue(node.opacityProperty(), 1, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.rotateProperty(), -90, WEB_EASE), new KeyValue(node.opacityProperty(), 0, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { super.starting(); rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight()); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), 90, WEB_EASE) ) ) .build(); node.getTransforms().add(rotate); }
@Override protected void starting() { double endX = node.getScene().getWidth() - node.localToScene(0, 0).getX(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(200), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), -20, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), endX, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { double endY = -node.localToScene(0, 0).getY() -node.getBoundsInParent().getHeight(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), endY, WEB_EASE) ) ) .build(); super.starting(); }
/** * Create new BounceTransition * * @param node The node to affect */ public BounceTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.translateYProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(200), new KeyValue(node.translateYProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(400), new KeyValue(node.translateYProperty(), -0.30*node.getBoundsInParent().getHeight(), WEB_EASE)), new KeyFrame(Duration.millis(500), new KeyValue(node.translateYProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(600), new KeyValue(node.translateYProperty(), -0.15*node.getBoundsInParent().getHeight(), WEB_EASE)), new KeyFrame(Duration.millis(800), new KeyValue(node.translateYProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.translateYProperty(), 0, WEB_EASE)) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double startY = -node.localToScene(0, 0).getY() -node.getBoundsInParent().getHeight(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), startY, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ) ) .build(); super.starting(); }
@Override protected void starting() { super.starting(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE), new KeyValue(node.rotateProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), node.getBoundsInLocal().getWidth(), WEB_EASE), new KeyValue(node.rotateProperty(), 120, WEB_EASE) ) ) .build(); }
/** * Create new FadeOutRightTransition * * @param node The node to affect */ public FadeOutRightTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), 20, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
/** * Create new FadeInUpTransition * * @param node The node to affect */ public FadeInRightTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), 20, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE) ) ) .build() ); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { super.starting(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), -node.getBoundsInLocal().getWidth(), WEB_EASE), new KeyValue(node.rotateProperty(), -120, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE), new KeyValue(node.rotateProperty(), 0, WEB_EASE) ) ) .build(); }
/** * Create new RotateInTransition * * @param node The node to affect */ public RotateInTransition(final Node node) { super( node, TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.rotateProperty(), -200, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.rotateProperty(), 0, WEB_EASE) ) ) .build()); setCycleDuration(Duration.seconds(1)); setDelay(Duration.seconds(0.2)); }
@Override protected void starting() { double endY = node.getScene().getHeight() - node.localToScene(0, 0).getY(); timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE) ), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), endY, WEB_EASE) ) ) .build(); super.starting(); }