private void fadeAway() { final FadeTransition fade = new FadeTransition(millis(EXIT_SPEED), notification); fade.setFromValue(1); fade.setToValue(0); final TranslateTransition trans = new TranslateTransition(millis(EXIT_SPEED), notification); trans.setFromY(0); trans.setToY(ENTER_Y); final SequentialTransition seq = new SequentialTransition(fade, trans); seq.setOnFinished(ev -> { if (destroyed.compareAndSet(false, true)) { remove(notification); } }); seq.play(); }
errorClipScale.setY(1); }); SequentialTransition transition = new SequentialTransition(scaleLess1, errorShowTransition); transition.play(); } else { errorClipScale.setY(oldVal == null ? 0 : getHeight() / errorContainerHeight); errorClipScale.setY(0); }); SequentialTransition transition = new SequentialTransition(scaleLess1); transition.play(); } else { errorClipScale.setY(0);
/** * {@inheritDoc} */ @Override protected void bootView() { final SequentialTransition st = new SequentialTransition(); model().object().tabs().stream().forEach(t -> st.getChildren().add(addTab(-1, t))); st.play(); }
public SequentialTransition removeTab(final List<Dockable> tabs) { final SequentialTransition seq = new SequentialTransition(); for (final Dockable tab : tabs) { final ToggleButton b = this.buttonByTab.get(tab.name()); final ScaleTransition st = new ScaleTransition(Duration.millis(600)); st.setNode(b); st.setFromX(1.0); st.setToX(0.0); st.setOnFinished(event -> this.box.getChildren().remove(b)); seq.getChildren().add(st); } return seq; }
fadeOutSeq = new SequentialTransition(); fadeOutSeq.setDelay(Duration.millis(2000)); fadeOutSeq.getChildren().add(fadeTransition); fadeOutSeq.setNode(getSkinnable());
@Override protected void handleControlPropertyChanged(String p) { super.handleControlPropertyChanged(p); if (p == "HOVER") { setGrowScrollbarAnimation(); if (getSkinnable().isHover() && fadeable) { fadeOutSeq.jumpTo(Duration.millis(0)); fadeOutSeq.stop(); } else if (fadeable && alreadyFaded) { fadeOutSeq.playFromStart(); } } if (p == "VALUE") { /* * when value changes, scrolling is activated and the scrollbar has to fade in for some * time and fade out again, when there is no further interaction */ if (fadeable && fadeOutSeq != null && fadeOutSeq.getCurrentRate() != 0.0d) { fadeOutSeq.playFromStart(); } else if (fadeable) { fading(); } } if (p == "VISIBLE") { if (fadeable && getSkinnable().isVisible()) { fading(); } } }
@Override public void handle(ActionEvent event) { alreadyFaded = true; fadeOutSeq.playFromStart(); } });
private void onOrientationChanged(final ObservableValue<? extends TabbedPaneOrientation> property, final TabbedPaneOrientation oldValue, final TabbedPaneOrientation newValue) { view().reloadButtonBar(); final SequentialTransition st = new SequentialTransition(); for (final Dockable tab : object().tabs()) { st.getChildren().add(view().addTab(object().tabs().size(), tab)); } st.play(); }
errorClipScale.setY(1); }); SequentialTransition transition = new SequentialTransition(scaleLess1, errorShowTransition); transition.play(); } else { errorClipScale.setY(oldVal == null ? 0 : getHeight() / errorContainerHeight); errorClipScale.setY(0); }); SequentialTransition transition = new SequentialTransition(scaleLess1); transition.play(); } else { errorClipScale.setY(0);
final SequentialTransition seq = new SequentialTransition(); st.setToX(1.0); seq.getChildren().add(st);
@SuppressWarnings("unchecked") private void onTabsChangedJAT(final ListChangeListener.Change<? extends Dockable> change) { final SequentialTransition st = new SequentialTransition(); while (change.next()) { System.out.println(change); if (change.wasPermutated()) { System.err.println("PERMUTATION -------------------------------------------------------------------"); // getView().removeTab(change.getList().get(change.getFrom())); // getView().addTab(0, change.getList().get(change.getFrom())); } if (change.wasRemoved()) { st.getChildren().add(view().removeTab((List<Dockable>) change.getRemoved())); } if (change.wasAdded()) { st.getChildren().add(view().addTab(change.getFrom(), change.getList().get(change.getFrom()))); } } st.play(); }
/** * {@inheritDoc} */ @Override protected void perform(final Wave wave) throws CommandException { final Node node = getNode(wave); final FadeInOutWaveBean waveBean = waveBean(wave); final FadeTransition fadeIn = new FadeTransition(); fadeIn.setAutoReverse(false); fadeIn.setCycleCount(1); fadeIn.setFromValue(0); fadeIn.setToValue(1.0); fadeIn.setDuration(waveBean.fadingInDuration()); fadeIn.setNode(node); final PauseTransition pause = new PauseTransition(); pause.setDuration(waveBean.showDuration()); final FadeTransition fadeOut = new FadeTransition(); fadeOut.setAutoReverse(false); fadeOut.setCycleCount(1); fadeOut.setFromValue(1.0); fadeOut.setToValue(0); fadeOut.setDuration(waveBean.fadingOutDuration()); fadeOut.setNode(node); final SequentialTransition pt = new SequentialTransition(); pt.getChildren().addAll(fadeIn, pause, fadeOut); pt.play(); }