Package javafx.animation

Examples of javafx.animation.Timeline


    this.settingsSetTimeline = GuiUtil.createShadowColorIndicatorTimeline(
        settingsDS, ATTENTION_COLOR, Color.BLACK, Timeline.INDEFINITE);
    // help view
    final InnerShadow helpTextEffect = new InnerShadow();
    helpTextEffect.setRadius(10d);
    final Timeline helpTextTimeline = GuiUtil.createShadowColorIndicatorTimeline(
        helpTextEffect, ATTENTION_COLOR, Color.BLACK.brighter(),
        HELP_TEXT_COLOR_CHANGE_CYCLE_COUNT);
    helpTextPane = new ScrollPane();
    helpTextPane.getStyleClass().add("text-area-help");
    //helpTextPane.setPrefHeight(40d);
    helpTextPane.setPrefWidth(300d);
    helpTextPane.setEffect(helpTextEffect);
    helpText = new Label(RS.rbLabel(UGateUtil.HELP_TEXT_DEFAULT_KEY));
    helpText.setWrapText(true);
    helpText.setPrefWidth(helpTextPane.getPrefWidth() - 35d);
    helpText.textProperty().addListener(new ChangeListener<String>() {
      @Override
      public void changed(ObservableValue<? extends String> observable, String oldValue,
          String newValue) {
        helpTextTimeline.stop();
        if (newValue != null && newValue.length() > 0 &&
            !newValue.equals(RS.rbLabel(UGateUtil.HELP_TEXT_DEFAULT_KEY))) {
          helpTextTimeline.play();
        }
      }
    });
    helpTextPane.setContent(helpText);
    defaultUserImg = RS.imgView(RS.IMG_LOCK);
View Full Code Here


     * based upon the center index
     */
    protected void update(final IndexRange excludeInAnimation) {
        // reset the time line and clear the children
        if (timeline!=null) timeline.stop();
        timeline = new Timeline();
        left.getChildren().clear();
        center.getChildren().clear();
        right.getChildren().clear();
        if (items.size() <= 0) {
          return;
View Full Code Here

    private long seq = 0;

    private FxTimer(java.time.Duration timeout, Runnable action, int cycles) {
        this.timeout = Duration.millis(timeout.toMillis());
        this.timeline = new Timeline();
        this.action = action;

        timeline.setCycleCount(cycles);
    }
View Full Code Here

    void maximize() {
        animate(this.prefHeight);
    }

    void animate(double toValue){
        Timeline timeline = new Timeline();
        timeline.getKeyFrames().add(
                new KeyFrame(Duration.seconds(1),
                        new KeyValue(getMaxHeightProperty(), toValue)));
        timeline.playFromStart();
    }
View Full Code Here

    setupAnnimationTab();
    }


  private void setupAnnimationTab() {
    timeline = new Timeline();
    timeline.setAutoReverse(false);
    timeline.currentTimeProperty().addListener(new ChangeListener<Duration>() {
      @Override
      public void changed(ObservableValue<? extends Duration> observable, Duration oldValue, Duration newValue) {
        slider.setValue(newValue.toMillis());
View Full Code Here

    if (effect instanceof DropShadow) {
      ((DropShadow) effect).setColor(offColor);
    } else {
      ((InnerShadow) effect).setColor(offColor);
    }
    final Timeline timeline = new Timeline();
    timeline.setCycleCount(cycleCount <=0 ? Timeline.INDEFINITE : cycleCount);
    timeline.setAutoReverse(true);
    final KeyFrame kf = new KeyFrame(Duration.millis(500), new EventHandler<ActionEvent>() {
      @Override
      public void handle(final ActionEvent event) {
        if (effect instanceof DropShadow) {
          ((DropShadow) effect).setColor(
              ((DropShadow) effect).getColor().equals(offColor) ? onColor : offColor);
        } else {
          ((InnerShadow) effect).setColor(
              ((InnerShadow) effect).getColor().equals(offColor) ? onColor : offColor);
        }
      }
    });
    timeline.setOnFinished(new EventHandler<ActionEvent>() {
      @Override
      public void handle(final ActionEvent event) {
        if (effect instanceof DropShadow) {
          ((DropShadow) effect).setColor(offColor);
        } else {
          ((InnerShadow) effect).setColor(offColor);
        }
      }
    });
    timeline.getKeyFrames().add(kf);
    return timeline;
  }
View Full Code Here

    public void start() {
        if (timeline == null) {
            KeyFrame kf = new KeyFrame(duration == INDEFINITE ? Duration.millis(Double.MAX_VALUE) : Duration.millis(duration), new KeyValue(value, 1));
            if (resolution > 0) {
                double framerate = 1000d / resolution;
                timeline = new Timeline(framerate, kf);
            } else {
                timeline = new Timeline(kf);
            }
        }
        target.begin();
        timeline.playFromStart();
    }
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

    // ******************** Constructors **************************************
    public GaugeSkin(Gauge gauge) {
        super(gauge);
        angleStep         = gauge.getAngleRange() / (gauge.getMaxValue() - gauge.getMinValue());
        timeline          = new Timeline();
        mouseEventHandler = mouseEvent -> handleMouseEvent(mouseEvent);
        touchEventHandler = touchEvent -> handleTouchEvent(touchEvent);
        markersToRemove   = new ArrayList<>();

        init();
View Full Code Here

    // ******************** Constructors **************************************
    public RadialBargraphSkin(RadialBargraph radialBargraph) {
        super(radialBargraph);
        angleStep         = radialBargraph.getAngleRange() / (radialBargraph.getMaxValue() - radialBargraph.getMinValue());
        angle             = new SimpleDoubleProperty(this, "angle", getSkinnable().getValue() * angleStep);
        timeline          = new Timeline();
        mouseEventHandler = mouseEvent -> handleMouseEvent(mouseEvent);
        touchEventHandler = touchEvent -> handleTouchEvent(touchEvent);
        markersToRemove   = new ArrayList<>();

        init();
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.