Package javafx.scene.effect

Examples of javafx.scene.effect.DropShadow.radiusProperty()


        DropShadow dropShadow = node.getEffect() != null ? (DropShadow) node.getEffect() : new DropShadow(BlurType.THREE_PASS_BOX, Color.BLACK, 0.0, 0.0, 0, 0);
        node.setEffect(dropShadow);
        Timeline timeline = new Timeline();
        timeline.getKeyFrames().add(
                new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC / 3),
                        new KeyValue(dropShadow.radiusProperty(), 3.0))
        );
        timeline.play();
    }

    public static void dropShadowOff(Node node) {
View Full Code Here


    public static void dropShadowOff(Node node) {
        DropShadow dropShadow = (DropShadow) node.getEffect();
        Timeline timeline = new Timeline();
        timeline.getKeyFrames().add(
                new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC / 3),
                        new KeyValue(dropShadow.radiusProperty(), 0.0))
        );
        timeline.setOnFinished((ev) -> node.setEffect(null));
        timeline.play();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.