APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.effect

public Class Bloom

extends Effect
Class Inheritance
Imports
javafx.beans.property.DoubleProperty, .DoublePropertyBase, .ObjectProperty, javafx.scene.Node, com.sun.javafx.util.Utils, com.sun.javafx.effect.EffectDirtyBits, com.sun.javafx.geom.BaseBounds, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.BoundsAccessor

A high-level effect that makes brighter portions of the input image appear to glow, based on a configurable threshold.

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:

The visual effect of applying bloom on text

Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private ObjectProperty<Effect>
input

The input for this Effect.

private DoubleProperty
threshold

The threshold value controls the minimum luminosity value of the pixels that will be made to glow.

Constructor Summary

AccessConstructor and Description
public
Bloom()

Creates a new instance of Bloom with default parameters.

public
Bloom(double
the threshold value for the bloom effect
threshold
)

Creates a new instance of Bloom with the specified threshold.

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv Effect
copy()

Implements abstract javafx.scene.effect.Effect.copy.

pack-priv Bloom
pack-priv BaseBounds
getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)

Implements abstract javafx.scene.effect.Effect.getBounds.

Returns bounds of given node with applied effect.

public final Effect
public final double
public final ObjectProperty<Effect>
public final void
public final void
setThreshold(double value)

public final DoubleProperty
pack-priv void
Inherited from javafx.scene.effect.Effect:
containsCycleseffectBoundsChangedgetInputBoundsgetKernelSizegetPeergetShadowBoundsmarkDirtysynctransformBounds

Field Detail

inputback to summary
private ObjectProperty<Effect> input

The input for this Effect. If set to null, or left unspecified, a graphical image of the Node to which the Effect is attached will be used as the input.

Default Value
null
thresholdback to summary
private DoubleProperty threshold

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/a
Default Value
0.3

Constructor Detail

Bloomback to summary
public Bloom()

Creates a new instance of Bloom with default parameters.

Bloomback to summary
public Bloom(double threshold)

Creates a new instance of Bloom with the specified threshold.

Parameters
threshold:double

the threshold value for the bloom effect

Since
JavaFX 2.1

Method Detail

checkChainContainsback to summary
pack-priv boolean checkChainContains(Effect e)

Implements abstract javafx.scene.effect.Effect.checkChainContains.

Annotations
@Override
copyback to summary
pack-priv Effect copy()

Implements abstract javafx.scene.effect.Effect.copy.

Annotations
@Override
createPeerback to summary
pack-priv Bloom createPeer()

Implements abstract javafx.scene.effect.Effect.createPeer.

Annotations
@Override
getBoundsback to summary
pack-priv BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)

Implements abstract javafx.scene.effect.Effect.getBounds.

Doc from javafx.scene.effect.Effect.getBounds.

Returns bounds of given node with applied effect. We *never* pass null in as a bounds. This method will NOT take a null bounds object. The returned value may be the same bounds object passed in, or it may be a new object.

Annotations
@Override
getInputback to summary
public final Effect getInput()
getThresholdback to summary
public final double getThreshold()
inputPropertyback to summary
public final ObjectProperty<Effect> inputProperty()
setInputback to summary
public final void setInput(Effect value)
setThresholdback to summary
public final void setThreshold(double value)
thresholdPropertyback to summary
public final DoubleProperty thresholdProperty()
updateback to summary
pack-priv void update()

Implements abstract javafx.scene.effect.Effect.update.

Annotations
@Override