Package javafx.scene.effect

Examples of javafx.scene.effect.ColorAdjust


    }

    public static void brightnessAdjust(Node node, double adjustment) {
        node.setCache(true);
        node.setCacheHint(CacheHint.SPEED);
        ColorAdjust adjust = new ColorAdjust();
        adjust.setBrightness(0.0);
        node.setEffect(adjust);
        Timeline timeline = new Timeline(new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC * 0.7),
                new KeyValue(adjust.brightnessProperty(), adjustment)));
        timeline.play();
    }
View Full Code Here


                new KeyValue(adjust.brightnessProperty(), adjustment)));
        timeline.play();
    }

    public static void brightnessUnadjust(Node node) {
        ColorAdjust effect = (ColorAdjust) node.getEffect();
        Timeline timeline = new Timeline(new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC * 0.7),
                new KeyValue(effect.brightnessProperty(), 0.0)));
        timeline.setOnFinished(ev -> node.setCache(false));
        timeline.play();
    }
View Full Code Here

TOP

Related Classes of javafx.scene.effect.ColorAdjust

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.