use of javafx.scene.effect.ColorAdjust in project bisq-desktop by bisq-network.
the class Transitions method removeEffect.
private void removeEffect(Node node, int duration) {
if (node != null) {
node.setMouseTransparent(false);
removeEffectTimeLine = new Timeline();
GaussianBlur blur = (GaussianBlur) node.getEffect();
if (blur != null) {
KeyValue kv1 = new KeyValue(blur.radiusProperty(), 0.0);
KeyFrame kf1 = new KeyFrame(Duration.millis(getDuration(duration)), kv1);
removeEffectTimeLine.getKeyFrames().add(kf1);
ColorAdjust darken = (ColorAdjust) blur.getInput();
KeyValue kv2 = new KeyValue(darken.brightnessProperty(), 0.0);
KeyFrame kf2 = new KeyFrame(Duration.millis(getDuration(duration)), kv2);
removeEffectTimeLine.getKeyFrames().add(kf2);
removeEffectTimeLine.setOnFinished(actionEvent -> {
node.setEffect(null);
removeEffectTimeLine = null;
});
removeEffectTimeLine.play();
} else {
node.setEffect(null);
removeEffectTimeLine = null;
}
}
}
use of javafx.scene.effect.ColorAdjust in project JFoenix by jfoenixadmin.
the class JFXColorPickerUI method refreshHSLCircle.
private void refreshHSLCircle() {
ColorAdjust colorAdjust = new ColorAdjust();
colorAdjust.setHue(map(currentHue + (currentHue < 127.5 ? 1 : -1) * 127.5, 0, 255, -1, 1));
slCircleView.setEffect(colorAdjust);
setColorAtLocation((int) selector.getTranslateX() + selectorSize / 2, (int) selector.getTranslateY() + selectorSize / 2);
}
use of javafx.scene.effect.ColorAdjust in project POL-POM-5 by PhoenicisOrg.
the class IconsListElementSkin method updateEnabled.
/**
* Updates grayscale of the miniature when the enabled state has been updated
*
* @param miniature The miniature
*/
private void updateEnabled(final Region miniature) {
if (!getControl().isEnabled()) {
final ColorAdjust grayScale = new ColorAdjust();
grayScale.setSaturation(-1);
miniature.setEffect(grayScale);
} else {
miniature.setEffect(null);
}
}
Aggregations