/** * TODO To complete. * * @param nextSlide the next slide */ private void performStepAnimation(final Node nextSlide) { this.subSlideTransition = ParallelTransitionBuilder.create() .onFinished( new EventHandler<ActionEvent>() { @Override public void handle(final ActionEvent event) { AbstractBaseView.this.currentSubSlide = nextSlide; } }) .children( SequentialTransitionBuilder.create() .node(this.currentSubSlide) .children( TranslateTransitionBuilder.create() .duration(Duration.millis(400)) .fromY(0) .toY(-700) // .fromZ(-10) .build(), TimelineBuilder.create() .keyFrames( new KeyFrame( Duration.millis(0), new KeyValue(this.currentSubSlide.visibleProperty(), true)), new KeyFrame( Duration.millis(1), new KeyValue(this.currentSubSlide.visibleProperty(), false))) .build()) .build(), SequentialTransitionBuilder.create() .node(nextSlide) .children( TimelineBuilder.create() .keyFrames( new KeyFrame( Duration.millis(0), new KeyValue(nextSlide.visibleProperty(), false)), new KeyFrame( Duration.millis(1), new KeyValue(nextSlide.visibleProperty(), true))) .build(), TranslateTransitionBuilder.create() .duration(Duration.millis(400)) .fromY(700) .toY(0) // .fromZ(-10) .build()) .build()) .build(); this.subSlideTransition.play(); }
@Override public void start(final Stage stage) throws Exception { this.stage = stage; stage.initStyle(StageStyle.UNDECORATED); stage.setTitle("PainelFX"); stage.setOnCloseRequest(new EventHandler<WindowEvent>() { @Override public void handle(WindowEvent t) { self.hide(); } }); // loop infinito TimelineBuilder.create().keyFrames(new KeyFrame(Duration.millis(100), new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { long time = Calendar.getInstance().getTimeInMillis(); // processando fila de senha processQueue(); // verificando screensaver if (currentLayout != null && !currentLayout.equals(screenSaverLayout)) { Integer screenSaverTimeout = main.getConfig().get(PainelConfig.KEY_SCREENSAVER_TIMEOUT, Integer.class).getValue(); if (screenSaverTimeout > 0) { if (time - lastUpdate > screenSaverTimeout * 1000) { self.changeLayout(screenSaverLayout); } } } } })).cycleCount(-1).build().play(); detectScreen(); senhaLayout = new SimpleSenhaLayout(this); screenSaverLayout = new VideoLayout(this); }
/** * 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)); }
/** {@inheritDoc} */ @Override public void reload() { // MUST be refactored with property binding // this.pageLabel.setText(String.valueOf(model().getSlideNumber())); // FadeTransitionBuilder.create() // .node(node().getTop()) // .duration(Duration.millis(600)) // .fromValue(0).toValue(0.7) // .build().play(); // FadeTransitionBuilder.create() // .node(node().getCenter()) // .duration(Duration.millis(600)) // .fromValue(0) // .toValue(0.4) // .build().play(); final MotionBlur mb = MotionBlurBuilder.create().angle(180).build(); this.primaryTitle.setEffect(mb); ParallelTransitionBuilder.create() .children( // ParallelTransitionBuilder.create().children( ScaleTransitionBuilder.create() .node(this.smallPokemon) .duration(Duration.millis(400)) .fromX(0) .fromY(0) .toX(1) .toY(1) .build(), RotateTransitionBuilder.create() .node(this.smallPokemon) .duration(Duration.millis(800)) .fromAngle(1080) .toAngle(-135) .build(), ScaleTransitionBuilder.create() .node(this.bigPokemon) .delay(Duration.millis(200)) .duration(Duration.millis(400)) .fromX(0) .fromY(0) .toX(1.2) .toY(1.2) .build(), RotateTransitionBuilder.create() .node(this.bigPokemon) .delay(Duration.millis(200)) .duration(Duration.millis(800)) .fromAngle(0) .toAngle(1080) .build(), TimelineBuilder.create() .delay(Duration.millis(200)) .keyFrames( new KeyFrame( Duration.millis(0), new KeyValue(this.topRectangle.widthProperty(), 0)), new KeyFrame( Duration.millis(600), new KeyValue(this.topRectangle.widthProperty(), 300))) .build(), TimelineBuilder.create() .delay(Duration.millis(1200)) .keyFrames( new KeyFrame( Duration.millis(0), new KeyValue(this.bottomRectangle.widthProperty(), 0), new KeyValue(this.bottomRectangle.xProperty(), 1000)), new KeyFrame( Duration.millis(300), new KeyValue(this.bottomRectangle.widthProperty(), 300), new KeyValue(this.bottomRectangle.xProperty(), 700))) .build(), TranslateTransitionBuilder.create() .node(this.placeLogo) .delay(Duration.millis(1200)) .duration(Duration.millis(300)) .toX(-400) .build(), TranslateTransitionBuilder.create() .node(this.primaryTitle) .delay(Duration.millis(200)) .duration(Duration.millis(400)) .toX(-3000 + 130) .build(), TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(0), new KeyValue(mb.radiusProperty(), 0)), new KeyFrame(Duration.millis(100), new KeyValue(mb.radiusProperty(), 50)), new KeyFrame(Duration.millis(200), new KeyValue(mb.radiusProperty(), 63)), new KeyFrame(Duration.millis(300), new KeyValue(mb.radiusProperty(), 50)), new KeyFrame(Duration.millis(400), new KeyValue(mb.radiusProperty(), 0))) .build(), // ).build() ParallelTransitionBuilder.create() .delay(Duration.millis(600)) .children( // RotateTransitionBuilder // .create() // .duration(Duration.millis(600)) // .fromAngle(-180) // .toAngle(0) // .build(), TranslateTransitionBuilder.create() .duration(Duration.millis(600)) .fromX(1024 / 2) .fromY(768 / 2) .toX(0) .toY(0) .build(), ScaleTransitionBuilder.create() .duration(Duration.millis(600)) .fromX(0) .fromY(0) .toX(1) .toY(1) .build()) .node(this.slideContent) .build()) .build() .play(); }