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();
}
public static void brightnessUnadjust(Node node) {
ColorAdjust effect = (ColorAdjust) node.getEffect();