Package javafx.animation

Examples of javafx.animation.Transition


        if (animate) {
            // lets animate the thumb transition
            final double startX = thumb.getLayoutX();
            final double startY = thumb.getLayoutY();
            Transition transition = new Transition() {
                {
                    setCycleDuration(Duration.millis(200));
                }

                @Override protected void interpolate(double frac) {
                    if (!Double.isNaN(startX)) {
                        thumb.setLayoutX(startX + frac * (endX - startX));
                    }
                    if (!Double.isNaN(startY)) {
                        thumb.setLayoutY(startY + frac * (endY - startY));
                    }
                }
            };
            transition.play();
        } else {
            thumb.setLayoutX(endX);
            thumb.setLayoutY(endY);
        }
    }
View Full Code Here


    if (getAnimationInterpolation() == null) {
      return;
    }
   
    if (transition == null) {
      transition = new Transition() {
        // anonymous constructor
        {
          setCycleDuration(getAnimationDuration());
          setAutoReverse(false);
          setCycleCount(1);
View Full Code Here

                    thresholdVisible.set(toggleThreshold);
                    lastThresholdTimerCall = NOW;
                }
            }
        };
        toValueAnimation = new Transition() {
            {
                setCycleDuration(Duration.millis(getAnimationDuration()));
            }
            protected void interpolate(double frac) {
                currentValue.set(getFormerValue() + (getValue() - getFormerValue()) * frac);
 
View Full Code Here

    }

    @FXML
    protected void handleControlButtonMouseEntered(MouseEvent event) {
        final Node source = (Node) event.getSource();
        final Transition t = createScaleTransition(1.2, source);
        t.playFromStart();
    }
View Full Code Here

    }

    @FXML
    protected void handleControlButtonMouseExited(MouseEvent event) {
        final Node source = (Node) event.getSource();
        final Transition t = createScaleTransition(1, source);
        t.playFromStart();
    }
View Full Code Here

    }

    @FXML
    protected void handleSocialButtonMouseEntered(MouseEvent event) {
        final Node source = (Node) event.getSource();
        final Transition t = createScaleTransition(1.2, source);
        t.playFromStart();
    }
View Full Code Here

    }

    @FXML
    protected void handleSocialButtonMouseExited(MouseEvent event) {
        final Node source = (Node) event.getSource();
        final Transition t = createScaleTransition(1, source);
        t.playFromStart();
    }
View Full Code Here

    }

    @FXML
    protected void handleSocialButtonMousePressed(MouseEvent event) {
        final Node source = (Node) event.getSource();
        final Transition t = createScaleTransition(0.8, source);
        t.playFromStart();
    }
View Full Code Here

    }

    @FXML
    protected void handleSocialButtonMouseReleased(MouseEvent event) {
        final Node source = (Node) event.getSource();
        final Transition t = createScaleTransition(1.2, source);
        t.playFromStart();
    }
View Full Code Here

        firstTime        = true;
        keepAspect       = true;
        toggleValue      = false;
        toggleThreshold  = false;
        interval         = 500;       
        toValueAnimation = new Transition() {
            {
                setCycleDuration(Duration.millis(getAnimationDuration()));
            }
            protected void interpolate(double frac) {
                currentValue.set(getFormerValue() + (getValue() - getFormerValue()) * frac);
 
View Full Code Here

TOP

Related Classes of javafx.animation.Transition

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.