Class Bloom
- javafx.scene.effect.Effect
-
- javafx.scene.effect.Bloom
public class Bloom extends Effect
Example:
Bloom bloom = new Bloom();
bloom.setThreshold(0.1);
Rectangle rect = new Rectangle();
rect.setX(10);
rect.setY(10);
rect.setWidth(160);
rect.setHeight(80);
rect.setFill(Color.DARKSLATEBLUE);
Text text = new Text();
text.setText("Bloom!");
text.setFill(Color.ALICEBLUE);
text.setFont(Font.font(null, FontWeight.BOLD, 40));
text.setX(25);
text.setY(65);
text.setEffect(bloom); The code above produces the following:
Since:
JavaFX 2.0
-
Property Summary
All MethodsInstance MethodsConcrete Methods Type Property and Description ObjectProperty<Effect>inputThe input for thisEffect.DoublePropertythresholdThe threshold value controls the minimum luminosity value of the pixels that will be made to glow.
-
Constructor Summary
Constructors Constructor and Description Bloom()Creates a new instance of Bloom with default parameters.Bloom(double threshold)Creates a new instance of Bloom with the specified threshold.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description EffectgetInput()Gets the value of the property input.doublegetThreshold()Gets the value of the property threshold.ObjectProperty<Effect>inputProperty()The input for thisEffect.voidsetInput(Effect value)Sets the value of the property input.voidsetThreshold(double value)Sets the value of the property threshold.DoublePropertythresholdProperty()The threshold value controls the minimum luminosity value of the pixels that will be made to glow.
-
Property Detail
-
input
public final ObjectProperty<Effect> inputProperty
The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
See Also:
-
threshold
public final DoubleProperty thresholdProperty
The threshold value controls the minimum luminosity value of the pixels that will be made to glow.Min: 0.0 Max: 1.0 Default: 0.3 Identity: n/aDefault value:
0.3
See Also:
-
-
Constructor Detail
-
Bloom
public Bloom()
Creates a new instance of Bloom with default parameters.
-
Bloom
public Bloom(double threshold)
Creates a new instance of Bloom with the specified threshold.Parameters:
threshold- the threshold value for the bloom effectSince:
JavaFX 2.1
-
-
Method Detail
-
setInput
public final void setInput(Effect value)
Sets the value of the property input.Property description:
The input for this
Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
-
getInput
public final Effect getInput()
Gets the value of the property input.Property description:
The input for this
Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
-
inputProperty
public final ObjectProperty<Effect> inputProperty()
The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
See Also:
-
setThreshold
public final void setThreshold(double value)
Sets the value of the property threshold.Property description:
The threshold value controls the minimum luminosity value of the pixels that will be made to glow.
Min: 0.0 Max: 1.0 Default: 0.3 Identity: n/aDefault value:
0.3
-
getThreshold
public final double getThreshold()
Gets the value of the property threshold.Property description:
The threshold value controls the minimum luminosity value of the pixels that will be made to glow.
Min: 0.0 Max: 1.0 Default: 0.3 Identity: n/aDefault value:
0.3
-
thresholdProperty
public final DoubleProperty thresholdProperty()
The threshold value controls the minimum luminosity value of the pixels that will be made to glow.Min: 0.0 Max: 1.0 Default: 0.3 Identity: n/aDefault value:
0.3
See Also:
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.