Example usage for javafx.scene.effect Bloom Bloom

List of usage examples for javafx.scene.effect Bloom Bloom

Introduction

In this page you can find the example usage for javafx.scene.effect Bloom Bloom.

Prototype

public Bloom(double threshold) 

Source Link

Document

Creates a new instance of Bloom with the specified threshold.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Text t1 = new Text("Drop Shadow!");
    t1.setFont(Font.font(24));/* w  w  w . ja  va 2s  .  c o  m*/
    t1.setEffect(new DropShadow());

    Text t2 = new Text("Blur!");
    t2.setFont(Font.font(24));
    t2.setEffect(new BoxBlur());

    Text t3 = new Text("Glow!");
    t3.setFont(Font.font(24));
    t3.setEffect(new Glow());

    Text t4 = new Text("Bloom!");
    t4.setFont(Font.font("Arial", FontWeight.BOLD, 24));
    t4.setFill(Color.WHITE);
    t4.setEffect(new Bloom(0.10));

    Rectangle rect = new Rectangle(100, 30, Color.GREEN);
    StackPane spane = new StackPane(rect, t4);

    HBox root = new HBox(t1, t2, t3, spane);
    root.setSpacing(20);

    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.setTitle("Applying Effects");
    stage.show();
}