Package javafx.scene.effect

Examples of javafx.scene.effect.GaussianBlur


        animation.setOnFinished(actionEvent -> parentPane.getChildren().remove(ui));
        return animation;
    }

    public static void blurOut(Node node) {
        GaussianBlur blur = new GaussianBlur(0.0);
        node.setEffect(blur);
        Timeline timeline = new Timeline();
        KeyValue kv = new KeyValue(blur.radiusProperty(), 10.0);
        KeyFrame kf = new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC), kv);
        timeline.getKeyFrames().add(kf);
        timeline.play();
    }
View Full Code Here


        timeline.getKeyFrames().add(kf);
        timeline.play();
    }

    public static void blurIn(Node node) {
        GaussianBlur blur = (GaussianBlur) node.getEffect();
        Timeline timeline = new Timeline();
        KeyValue kv = new KeyValue(blur.radiusProperty(), 0.0);
        KeyFrame kf = new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC), kv);
        timeline.getKeyFrames().add(kf);
        timeline.setOnFinished(actionEvent -> node.setEffect(null));
        timeline.play();
    }
View Full Code Here

        button.getChildren().add(gradientRect);

        // build arrowBlurShadow
        SVGPath arrowBlurShadow = SVGPathBuilder.create()
                .fill(Color.BLACK)
                .effect(new GaussianBlur(5))
                .transforms(scale)
                .content("m 17.40912,2.47162 c -8.27303,0 -14.9375,7.04253 -14.9375,15.78125 l 0,59.9375 c 0,8.73872 6.66447,15.75 14.9375,15.75 l 84.625,0 c 8.27303,0 14.9375,-7.01128 14.9375,-15.75 l 0,-59.9375 c 0,-8.73872 -6.66447,-15.78125 -14.9375,-15.78125 l -84.625,0 z m 45.0625,18.15625 27.5625,27.59375 -27.5625,27.5625 0,-15.5625 -33.0625,0 0,-24 33.0625,0 0,-15.59375 z")
                .id("#button-arrow-blur-shadow")
                .build();
        button.getChildren().add(arrowBlurShadow);
View Full Code Here

        colorAdjust.saturationProperty().bind(when(equal(state, LighthouseBackend.ProjectState.CLAIMED)).then(-0.9).otherwise(0.0));
        if (GuiUtils.isSoftwarePipeline()) {
            // SW pipeline cannot handle gaussian blurs with acceptable performance.
            coverImage.setEffect(colorAdjust);
        } else {
            GaussianBlur blur = new GaussianBlur();
            blur.setInput(colorAdjust);
            animatedBind(coverImage, blur.radiusProperty(), when(isLoading).then(25).otherwise(0.0));
            coverImage.setEffect(blur);
        }
        coverImage.setImage(image);
        coverImage.setClip(new Rectangle(coverImage.getFitWidth(), coverImage.getFitHeight()));
View Full Code Here

        ft.play();
        return ft;
    }

    public static void blurOut(Node node) {
        GaussianBlur blur = new GaussianBlur(0.0);
        node.setEffect(blur);
        Timeline timeline = new Timeline();
        KeyValue kv = new KeyValue(blur.radiusProperty(), 10.0);
        KeyFrame kf = new KeyFrame(UI_ANIMATION_TIME, kv);
        timeline.getKeyFrames().add(kf);
        timeline.play();
    }
View Full Code Here

        timeline.getKeyFrames().add(kf);
        timeline.play();
    }

    public static void blurIn(Node node, Duration duration) {
        GaussianBlur blur = (GaussianBlur) node.getEffect();
        if (blur == null) {
            Main.log.error("BUG: Attempted to cancel non-existent blur.");
            return;
        }
        Timeline timeline = new Timeline();
        KeyValue kv = new KeyValue(blur.radiusProperty(), 0.0);
        KeyFrame kf = new KeyFrame(duration, kv);
        timeline.getKeyFrames().add(kf);
        timeline.setOnFinished(actionEvent -> node.setEffect(null));
        timeline.play();
    }
View Full Code Here

TOP

Related Classes of javafx.scene.effect.GaussianBlur

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.