Package javafx.animation

Examples of javafx.animation.Timeline


    }

    public void hide() {
        setCache(true);

        Timeline timeline = new Timeline(new KeyFrame(DURATION_HIDE, (ActionEvent t) -> {
            setCache(false);
            setVisible(false);
            getChildren().
                    clear();
        },
                new KeyValue(opacityProperty(), 0, Interpolator.EASE_BOTH)));
        timeline.play();

    }
View Full Code Here


        dialogPane.toFront();
        setOpacity(0);
        setCache(true);
        setVisible(true);

        Timeline timeline = new Timeline(new KeyFrame(DURATION_SHOW, (ActionEvent t) -> {
            setCache(false);
        },new KeyValue(opacityProperty(), 1, Interpolator.EASE_BOTH)));

        timeline.play();
    }
View Full Code Here

        });
    }

    public void startUpdateTimer() {
        stopUpdateTimer();
        updateTimer = new Timeline(new KeyFrame(Duration.seconds(getUpdateTimerInterval()), (ActionEvent event) -> {
            refreshDomainState();
        }));
        updateTimer.setCycleCount(Timeline.INDEFINITE);
        updateTimer.play();
    }
View Full Code Here

        progressIndicator.visibleProperty().bind(service.runningProperty());
        taskList.itemsProperty().bind(service.valueProperty());

        service.start();

        Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(10), event -> service.restart()));
        timeline.setCycleCount(Timeline.INDEFINITE);
        timeline.play();
    }
View Full Code Here

  final FadeTransition fade = FadeTransitionBuilder.create()
    .node(this.itemGroup).duration(Duration.millis(400))
    .fromValue(0).toValue(1.0).build();
  anim.add(fade);

  final Animation offset = new Timeline(new KeyFrame(Duration.ZERO,
    new KeyValue(this.offsetProperty(), 0)), new KeyFrame(
    Duration.millis(300), new KeyValue(this.offsetProperty(),
      this.lastOffsetValue)));
  anim.add(offset);

  final Animation angle = new Timeline(new KeyFrame(Duration.ZERO,
    new KeyValue(this.initialAngleProperty(),
      this.lastInitialAngleValue + 20)), new KeyFrame(
    Duration.millis(300), new KeyValue(this.initialAngleProperty(),
      this.lastInitialAngleValue)));
  anim.add(angle);
View Full Code Here

        locked              = new SimpleBooleanProperty(true);
        text                = new SimpleStringProperty(displayText);
        startX              = new SimpleDoubleProperty(START_XCOORD);
        endX                = new SimpleDoubleProperty(START_XCOORD);
        textOpacity         = new SimpleDoubleProperty(1);
        snapButtonBackAnim  = new Timeline();
        unlockAnimation     = new Timeline();

        // simple gray as a default
        buttonArrowBackgroundColor = new SimpleObjectProperty<Paint>();
        // main button area surface
        buttonColor = new SimpleObjectProperty<Paint>();
View Full Code Here

        } else {    // Timed dialog
            stage.setOpacity(0d);
            stage.show();
            final DoubleProperty opacity = stage.opacityProperty();

            Timeline fadeIn = new Timeline(
                    new KeyFrame(Duration.ZERO, new KeyValue(opacity, 0d)),
                    new KeyFrame(new Duration(fadeInOutTime * 1000),
                            new EventHandler() {
                                @Override
                                public void handle(Event t) {
                                    Timeline display = new Timeline(
                                            new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
                                            new KeyFrame(new Duration((displayTime - fadeInOutTime * 2) * 1000),
                                                    new EventHandler() {
                                                        @Override
                                                        public void handle(Event t) {
                                                            Timeline fadeOut = new Timeline(
                                                                    new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
                                                                    new KeyFrame(new Duration(fadeInOutTime * 1000),
                                                                            new EventHandler() {
                                                                                @Override
                                                                                public void handle(Event t) {
                                                                                    stage.hide();
                                                                                }
                                                                            }, new KeyValue(opacity, 0d)));
                                                            fadeOut.play();
                                                        }
                                                    }, new KeyValue(opacity, 1d)));
                                    display.play();
                                }
                            }, new KeyValue(opacity, 1d)));
View Full Code Here

        this.getChildren().addAll(textField, btnUp, btnDown);

        //
        // Mouse Handler for buttons
        //
        timeline = new Timeline();
        final EventHandler<ActionEvent> btnUpHandler = actionEvent -> CONTROL.increment();
        btnUp.setOnMousePressed(arg0 -> {
            final KeyFrame kf = new KeyFrame(Duration.millis(50), btnUpHandler);
            timeline.setDelay(Duration.millis(500));
            timeline.getKeyFrames().clear();
View Full Code Here

            if (storeOldHeight) {
                oldHeight = control.getPrefHeight();
            }

            minimizeTimeLine = new Timeline(
                    new KeyFrame(Duration.ZERO,
                    new KeyValue(control.prefHeightProperty(), control.getPrefHeight())),
                    new KeyFrame(Duration.seconds(0.2),
                    new KeyValue(control.prefHeightProperty(), newHeight)));
View Full Code Here

    }
    private void removeTabs(List<? extends Tab> removedList, final Map<Tab, Timeline> closedTab) {
        for (final Tab tab : removedList) {
            // Animate the tab removal
            final TabHeaderSkin tabRegion = tabHeaderArea.getTabHeaderSkin(tab);
            Timeline closedTabTimeline = null;
            if (tabRegion != null) {
                if( closeTabAnimation.get() == TabAnimation.GROW ) {
                    tabRegion.animating = true;
                    closedTabTimeline = createTimeline(tabRegion, Duration.millis(ANIMATION_SPEED * 1.5F), 0.0F, new EventHandler<ActionEvent>() {
                        @Override public void handle(ActionEvent event) {     
                            handleClosedTab(tab, closedTab);
                        }
                    });
                    closedTabTimeline.play();   
                } else {
                    handleClosedTab(tab, closedTab);
                }
            }
            closedTab.put(tab, closedTabTimeline);
View Full Code Here

TOP

Related Classes of javafx.animation.Timeline

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.