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

public Class GaussianBlur

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 blur effect using a Gaussian convolution kernel, with a configurable radius.

Example:

Text text = new Text();
text.setText("Blurry Text!");
text.setFill(Color.web("0x3b596d"));
text.setFont(Font.font(null, FontWeight.BOLD, 50));
text.setX(10);
text.setY(50);

text.setEffect(new GaussianBlur());

The code above produces the following:

The visual effect of GaussianBlur
on text

Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private ObjectProperty<Effect>
input

The input for this Effect.

private DoubleProperty
radius

The radius of the blur kernel.

Constructor Summary

AccessConstructor and Description
public
GaussianBlur()

Creates a new instance of GaussianBlur with default parameters.

public
GaussianBlur(double
the radius of the blur kernel
radius
)

Creates a new instance of GaussianBlur with the specified radius.

Method Summary

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

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

pack-priv GaussianBlur
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.

private float
public final Effect
public final double
public final ObjectProperty<Effect>
public final DoubleProperty
public final void
public final void
setRadius(double value)

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
radiusback to summary
private DoubleProperty radius

The radius of the blur kernel.

      Min:  0.0
      Max: 63.0
  Default: 10.0
 Identity:  0.0
Default Value
10.0

Constructor Detail

GaussianBlurback to summary
public GaussianBlur()

Creates a new instance of GaussianBlur with default parameters.

GaussianBlurback to summary
public GaussianBlur(double radius)

Creates a new instance of GaussianBlur with the specified radius.

Parameters
radius:double

the radius of the blur kernel

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 GaussianBlur 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
getClampedRadiusback to summary
private float getClampedRadius()
getInputback to summary
public final Effect getInput()
getRadiusback to summary
public final double getRadius()
inputPropertyback to summary
public final ObjectProperty<Effect> inputProperty()
radiusPropertyback to summary
public final DoubleProperty radiusProperty()
setInputback to summary
public final void setInput(Effect value)
setRadiusback to summary
public final void setRadius(double value)
updateback to summary
pack-priv void update()

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

Annotations
@Override