pTrans.stop(); pTrans = new ParallelTransition(colorsTransition, selectorTransition); pTrans.setOnFinished((finish) -> { if (pTrans.getStatus() == Status.STOPPED) { allowColorChange = true; pTrans.play();
showTransition.setOnFinished((finish) -> { Group vf = (Group) suggestionList.lookup(".sheet"); ParallelTransition trans = new ParallelTransition(); for (int i = 0; i < vf.getChildren().size(); i++) { ListCell<T> cell = (ListCell<T>) vf.getChildren().get(i); new KeyValue(cell.translateYProperty(), 0, Interpolator.EASE_BOTH))); f.setDelay(Duration.millis(index * 20)); trans.getChildren().add(f); trans.play(); }); showTransition.play();
private void switchTimeUnit(TimeUnit newVal) { if (newVal == TimeUnit.HOURS) { Timeline fadeout = new Timeline(new KeyFrame(Duration.millis(320), new KeyValue(minutesContent.opacityProperty(), 0, Interpolator.EASE_BOTH))); Timeline fadein = new Timeline(new KeyFrame(Duration.millis(320), new KeyValue(hoursContent.opacityProperty(), 1, Interpolator.EASE_BOTH))); new ParallelTransition(fadeout, fadein).play(); } else { Timeline fadeout = new Timeline(new KeyFrame(Duration.millis(320), new KeyValue(hoursContent.opacityProperty(), 0, Interpolator.EASE_BOTH))); Timeline fadein = new Timeline(new KeyFrame(Duration.millis(320), new KeyValue(minutesContent.opacityProperty(), 1, Interpolator.EASE_BOTH))); new ParallelTransition(fadeout, fadein).play(); } }
trans.stop(); ParallelTransition newTransition = new ParallelTransition(); newTransition.getChildren().addAll(animationMap.values()); newTransition.play(); trans = newTransition; dirtyBoxes = false;
protected void zoomOutUpdateToAndScaleInLocation1(PushStructureContentEvent current) { ScaleTransition st = NodeHelper.scaleOut(currentLocation, Duration.millis(300)); st.setToX(0.6); st.setToY(0.6); FadeTransition ft = NodeHelper.fadeOut(currentLocation, Duration.millis(300)); EasingInterpolator ei = new EasingInterpolator(EasingMode.IN_CIRC); ParallelTransition pt = new ParallelTransition(st, ft); pt.setInterpolator(ei); pt.setOnFinished(e -> { ScaleTransition st2 = NodeHelper.scaleIn(currentLocation, Duration.millis(500)); st2.setFromX(0.6); st2.setFromY(0.6); EasingInterpolator ei2 = new EasingInterpolator(EasingMode.IN_EXPO); FadeTransition ft2 = NodeHelper.fadeIn(currentLocation, Duration.millis(200)); ParallelTransition pt2 = new ParallelTransition(st2, ft2); pt2.setInterpolator(ei2); pt2.play(); }); pt.play(); }
ft.setToValue(0); ParallelTransition pt = new ParallelTransition(ft); pt.setOnFinished(e -> barGroup.getChildren().remove(text)); pt.play();
final ParallelTransition animation = new ParallelTransition(); ft.setToValue(0.0); animation.getChildren().add(ft); ft.setToValue(1.0); animation.getChildren().add(ft); animation.setOnFinished(event -> { if (oldNodeLink != null) { animation.playFromStart();
menuBar_Slide.setAutoReverse(false); ParallelTransition ShowMenu = new ParallelTransition(); ShowMenu.getChildren().addAll(clipPane_Slide, menuBar_Slide); ShowMenu.setCycleCount(1); ShowMenu.playFromStart(); menuBar_Slide.setAutoReverse(false); ParallelTransition HideMenu = new ParallelTransition(); HideMenu.getChildren().addAll(clipPane_Slide, menuBar_Slide); HideMenu.setCycleCount(1); HideMenu.playFromStart();
.mapToObj(this::createMoveLeft) .forEachOrdered( moveLeft -> changeNumbers.getChildren().add(moveLeft) ); changeNumbers.setOnFinished(e -> idx.set(toIdx.get())); changeNumbers.play() );
parallelTransition.stop(); parallelTransition.getChildren().clear(); parallelTransition.getChildren().add(t); parallelTransition.play();
rt.setAutoReverse(true); ParallelTransition parallelTransition = new ParallelTransition(); parallelTransition.setNode(node); parallelTransition.getChildren().addAll(pt, rt);
/** * When navigationItems size is equals to 2, and the user has clicked on back button, fade out * location0 and backIcon together, in order to have more stable effect. * <p> * At the end of the effect, navigationItems is updated because the visibility of back icon is * binded to navigationItems size. */ private void fadeOutLocation0AndBackIconAndRemoveLastItem() { EasingInterpolator ei = new EasingInterpolator(EasingMode.IN_OUT_CIRC); FadeTransition ft = NodeHelper.fadeOut(previousLocation, Duration.millis(100)); FadeTransition bif = NodeHelper.fadeOut(backIcon, Duration.millis(100)); ParallelTransition pt = new ParallelTransition(ft, bif); pt.setInterpolator(ei); pt.play(); }
animation.setOnFinished(evt -> { if (iterator.hasNext()) { animation.play(); animation.play();
animation.setAutoReverse(true); animation.setCycleCount(2); button.disableProperty().bind(animation.statusProperty().isEqualTo(Animation.Status.RUNNING)); button.setOnAction(e -> animation.play());
init(primaryStage); primaryStage.show(); scalingCirclePathTransition.play();
for (final Node node : this.nodes) { parallel.getChildren().add( TranslateTransitionBuilder.create() .delay(Duration.millis(i * getNodeDelay()))
trans.stop(); ParallelTransition newTransition = new ParallelTransition(); newTransition.getChildren().addAll(animationMap.values()); newTransition.play(); trans = newTransition; dirtyBoxes = false;
protected void zoomOutUpdateToAndScaleInLocation1(PushStructureContentEvent current) { ScaleTransition st = NodeHelper.scaleOut(location1, Duration.millis(300)); st.setToX(0.6); st.setToY(0.6); FadeTransition ft = NodeHelper.fadeOut(location1, Duration.millis(300)); EasingInterpolator ei = new EasingInterpolator(EasingMode.IN_CIRC); ParallelTransition pt = new ParallelTransition(st, ft); pt.setInterpolator(ei); pt.setOnFinished(e -> { location1.textProperty().unbind(); ScaleTransition st2 = NodeHelper.scaleIn(location1, Duration.millis(500)); st2.setFromX(0.6); st2.setFromY(0.6); EasingInterpolator ei2 = new EasingInterpolator(EasingMode.IN_EXPO); FadeTransition ft2 = NodeHelper.fadeIn(location1, Duration.millis(200)); ParallelTransition pt2 = new ParallelTransition(st2, ft2); pt2.setInterpolator(ei2); pt2.play(); }); pt.play(); }
ft.setToValue(0); ParallelTransition pt = new ParallelTransition(ft); pt.setOnFinished(e -> barGroup.getChildren().remove(text)); pt.play();