use of javafx.scene.effect.GaussianBlur in project PayFile by mikehearn.
the class GuiUtils method blurOut.
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();
}
use of javafx.scene.effect.GaussianBlur in project PayFile by mikehearn.
the class GuiUtils method blurIn.
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();
}
use of javafx.scene.effect.GaussianBlur in project OTP2_R6_svaap by JNuutinen.
the class Unit method drawShip.
/**
* Asettaa Unitin aluksen visuaalisia piirteitä sen mukaan, onko alus pelaaja vai vihollinen.
* @param shape Aluksen Shape-olio.
*/
void drawShip(Shape shape) {
this.shape = shape;
int tag = getTag();
this.shape.setEffect(new GaussianBlur(2.0));
this.shape.setFill(Color.BLACK);
this.shape.setStrokeWidth(5.0);
getChildren().add(this.shape);
this.shape.setStroke(color);
}
use of javafx.scene.effect.GaussianBlur in project OTP2_R6_svaap by JNuutinen.
the class Missile method buildProjectile.
/**
* Rakentaa projectilen Polygonin
* @param speed Projectilen nopeus, vaikuttaa hännän pituuteen
* @param color Projectilen väri
* @return Rakennettu Polygon
*/
private Polygon buildProjectile(double speed, Color color) {
// Ammuksen muoto
Polygon shape = new Polygon();
shape.getPoints().addAll(-9.0, 0.0, 0.0, -3.0, // ammuksen häntä skaalautuu nopeuden mukaan, mutta on ainakin 1.0
speed * 0.6 + 1.0, // ammuksen häntä skaalautuu nopeuden mukaan, mutta on ainakin 1.0
0.0, 0.0, 3.0);
Bloom bloom = new Bloom(0.0);
GaussianBlur blur = new GaussianBlur(3.0);
blur.setInput(bloom);
shape.setFill(Color.TRANSPARENT);
shape.setStroke(Color.WHITE);
shape.setStrokeWidth(5.0);
shape.getTransforms().add(new Rotate(180, 0, 0));
return shape;
}
use of javafx.scene.effect.GaussianBlur in project bitsquare by bitsquare.
the class Transitions method blur.
public void blur(Node node, int duration, double brightness, boolean removeNode, double blurRadius) {
if (removeEffectTimeLine != null)
removeEffectTimeLine.stop();
node.setMouseTransparent(true);
GaussianBlur blur = new GaussianBlur(0.0);
Timeline timeline = new Timeline();
KeyValue kv1 = new KeyValue(blur.radiusProperty(), blurRadius);
KeyFrame kf1 = new KeyFrame(Duration.millis(getDuration(duration)), kv1);
ColorAdjust darken = new ColorAdjust();
darken.setBrightness(0.0);
blur.setInput(darken);
KeyValue kv2 = new KeyValue(darken.brightnessProperty(), brightness);
KeyFrame kf2 = new KeyFrame(Duration.millis(getDuration(duration)), kv2);
timeline.getKeyFrames().addAll(kf1, kf2);
node.setEffect(blur);
if (removeNode)
timeline.setOnFinished(actionEvent -> UserThread.execute(() -> ((Pane) (node.getParent())).getChildren().remove(node)));
timeline.play();
}
Aggregations