Class MotionBlur
- javafx.scene.effect.Effect
-
- javafx.scene.effect.MotionBlur
public class MotionBlur extends Effect
Example:
MotionBlur motionBlur = new MotionBlur();
motionBlur.setRadius(30);
motionBlur.setAngle(-15.0);
Text text = new Text();
text.setX(20.0);
text.setY(100.0);
text.setText("Motion!");
text.setFill(Color.web("0x3b596d"));
text.setFont(Font.font(null, FontWeight.BOLD, 60));
text.setEffect(motionBlur); The code above produces the following:
Since:
JavaFX 2.0
-
Property Summary
All MethodsInstance MethodsConcrete Methods Type Property and Description DoublePropertyangleThe angle of the motion effect, in degrees.ObjectProperty<Effect>inputThe input for thisEffect.DoublePropertyradiusThe radius of the blur kernel.
-
Constructor Summary
Constructors Constructor and Description MotionBlur()Creates a new instance of MotionBlur with default parameters.MotionBlur(double angle, double radius)Creates a new instance of MotionBlur with the specified angle and radius.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description DoublePropertyangleProperty()The angle of the motion effect, in degrees.doublegetAngle()Gets the value of the property angle.EffectgetInput()Gets the value of the property input.doublegetRadius()Gets the value of the property radius.ObjectProperty<Effect>inputProperty()The input for thisEffect.DoublePropertyradiusProperty()The radius of the blur kernel.voidsetAngle(double value)Sets the value of the property angle.voidsetInput(Effect value)Sets the value of the property input.voidsetRadius(double value)Sets the value of the property radius.
-
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:
-
radius
public final DoubleProperty radiusProperty
The radius of the blur kernel.Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0Default value:
10.0
See Also:
-
angle
public final DoubleProperty angleProperty
The angle of the motion effect, in degrees.Min: n/a Max: n/a Default: 0.0 Identity: n/aDefault value:
0.0
See Also:
-
-
Constructor Detail
-
MotionBlur
public MotionBlur()
Creates a new instance of MotionBlur with default parameters.
-
MotionBlur
public MotionBlur(double angle, double radius)Creates a new instance of MotionBlur with the specified angle and radius.Parameters:
angle- the angle of the motion effect, in degreesSince:
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:
-
setRadius
public final void setRadius(double value)
Sets the value of the property radius.Property description:
The radius of the blur kernel.
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0Default value:
10.0
-
getRadius
public final double getRadius()
Gets the value of the property radius.Property description:
The radius of the blur kernel.
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0Default value:
10.0
-
radiusProperty
public final DoubleProperty radiusProperty()
The radius of the blur kernel.Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0Default value:
10.0
See Also:
-
setAngle
public final void setAngle(double value)
Sets the value of the property angle.Property description:
The angle of the motion effect, in degrees.
Min: n/a Max: n/a Default: 0.0 Identity: n/aDefault value:
0.0
-
getAngle
public final double getAngle()
Gets the value of the property angle.Property description:
The angle of the motion effect, in degrees.
Min: n/a Max: n/a Default: 0.0 Identity: n/aDefault value:
0.0
-
angleProperty
public final DoubleProperty angleProperty()
The angle of the motion effect, in degrees.Min: n/a Max: n/a Default: 0.0 Identity: n/aDefault value:
0.0
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.