Package javafx.animation

Examples of javafx.animation.Timeline


    }
    private void addTabs(List<? extends Tab> addedList, int from, boolean handle, final Map<Tab, Timeline> closedTab) {
        int i = 0;
        for (final Tab tab : addedList) {
            // Handle the case where we are removing and adding the same tab.
            Timeline closedTabTimeline = closedTab.get(tab);
            if (closedTabTimeline != null) {
                closedTabTimeline.stop();
                Iterator<Tab> keys = closedTab.keySet().iterator();
                while (keys.hasNext()) {
                    Tab key = keys.next();
                    if (tab.equals(key)) {
                        removeTab(key);
View Full Code Here


        getSkinnable().impl_reapplyCSS();
        getSkinnable().requestLayout();
    }

    private Timeline createTimeline(final TabHeaderSkin tabRegion, final Duration duration, final double endValue, final EventHandler<ActionEvent> func) {
        Timeline timeline = new Timeline();
        timeline.setCycleCount(1);

        KeyValue keyValue = new KeyValue(tabRegion.prefWidth, endValue, Interpolator.LINEAR);

        timeline.getKeyFrames().clear();
        timeline.getKeyFrames().add(new KeyFrame(duration, func, keyValue));
        return timeline;
    }
View Full Code Here

        // the left/right arrows on the control buttons tab
        private Timeline scroller;

        private void createScrollTimeline(final double val) {
            scroll(val);
            scroller = new Timeline();
            scroller.setCycleCount(Timeline.INDEFINITE);
            scroller.getKeyFrames().add(new KeyFrame(Duration.millis(150), new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent event) {
                    scroll(val);
                }
View Full Code Here

            positionInArea(inner, x, y, w, h, /*baseline ignored*/0, HPos.CENTER, VPos.BOTTOM);
        }

        private void showControlButtons() {
            double prefHeight = snapSize(prefHeight(-1));
            Timeline timeline = new Timeline();
            KeyValue keyValue = new KeyValue(controlTabHeight, prefHeight, Interpolator.EASE_OUT);

            setVisible(true);
            timeline.getKeyFrames().clear();
            timeline.getKeyFrames().add(new KeyFrame(Duration.millis(ANIMATION_SPEED), new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent event) {
                    if (popup == null) {
                        setupPopupMenu();
                    }
                    requestLayout();
                }
            }, keyValue));
            timeline.play();
        }
View Full Code Here

            timeline.play();
        }

        private void hideControlButtons() {
            setAnimationLock(true);
            Timeline timeline = new Timeline();
            KeyValue keyValue = new KeyValue(controlTabHeight, 0.0, Interpolator.EASE_IN);

            timeline.getKeyFrames().clear();
            timeline.getKeyFrames().add(new KeyFrame(Duration.millis(ANIMATION_SPEED), new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent event) {
                    if (!isShowTabsMenu()) {
                        downArrowBtn.setVisible(false);
                    }
                    // If the scroll arrows or tab menu is still visible we don't want
                    // to hide it animate it back it.
                    if (isShowTabsMenu()) {
                        showControlButtons = true;
                    } else {
                        setVisible(false);
                        popup.getItems().clear();
                        popup = null;
                    }
                    setAnimationLock(false);
                    // This needs to be called when we are in the left tabPosition
                    // to allow for the clip offset to move properly (otherwise
                    // it jumps too early - before the animation is done).
                    requestLayout();
                }
            }, keyValue));
            timeline.play();
        }
View Full Code Here

            root.getChildren().setAll(ivScene[0], ivScene[1]);
         }
      };
      fadeout.setOnFinished(eh);

      timeline = new Timeline();
      timeline.setCycleCount(Timeline.INDEFINITE);
      KeyFrame[] kf = new KeyFrame[1];
      eh = new EventHandler<ActionEvent>()
      {
         public void handle(ActionEvent ae)
View Full Code Here

        KeyFrame kf1 = new KeyFrame(Duration.millis(0), keyValueVisible);
        KeyFrame kf2 = new KeyFrame(Duration.millis(1000), keyValueVisible);
        KeyFrame kf3 = new KeyFrame(Duration.millis(1500), keyValueInvisible);

        Timeline timeline = new Timeline();
        timeline.getKeyFrames().setAll(kf1, kf2, kf3);
        faderMap.put(NODE, timeline);
        timeline.setOnFinished(actionEvent -> { faderMap.remove(NODE); });
        timeline.play();
    }
View Full Code Here

    Scene scene = new Scene(borderPane, 500, 450);
    setScene(scene);

    _controller.execute("games", new Object[] { "default", _user });

    refreshTimeLine = new Timeline(new KeyFrame(Duration.seconds(300),
        new EventHandler<ActionEvent>() {

          @Override
          public void handle(ActionEvent event) {
            _controller.execute("refreshRoom",
View Full Code Here

        secondRotate              = new Rotate();

        ticks                     = new ArrayList<>(60);
        tickLabels                = new ArrayList<>(12);

        timeline                  = new Timeline();

        init();
        initGraphics();
        registerListeners();
    }
View Full Code Here

            kv = new KeyValue(currentMinuteAngle, 360, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
        } else if ((int) currentMinuteAngle.get() == 0 && ANGLE == 354) {
            kv = new KeyValue(currentMinuteAngle, -6, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
        }       
        final KeyFrame kf = new KeyFrame(Duration.millis(200), kv);
        timeline = new Timeline();
        timeline.getKeyFrames().add(kf);
        timeline.setOnFinished(event -> {
            if ((int) currentMinuteAngle.get() == 360) {
                currentMinuteAngle.set(0);
            } else if ((int) currentMinuteAngle.get() == -6) {
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.