java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.BoxBlur
A blur effect using a simple box filter kernel, with separately
 configurable sizes in both dimensions, and an iteration parameter
 that controls the quality of the resulting blur.
 
Example:
 BoxBlur boxBlur = new BoxBlur();
 boxBlur.setWidth(10);
 boxBlur.setHeight(3);
 boxBlur.setIterations(3);
 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(boxBlur);
 The code above produces the following:
  
 
- Since:
- JavaFX 2.0
- 
Property SummaryPropertiesTypePropertyDescriptionfinal DoublePropertyThe vertical dimension of the blur effect.final ObjectProperty<Effect> The input for thisEffect.final IntegerPropertyThe number of times to iterate the blur effect to improve its "quality" or "smoothness".final DoublePropertyThe horizontal dimension of the blur effect.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal doubleGets the value of theheightproperty.final EffectgetInput()Gets the value of theinputproperty.final intGets the value of theiterationsproperty.final doublegetWidth()Gets the value of thewidthproperty.final DoublePropertyThe vertical dimension of the blur effect.final ObjectProperty<Effect> The input for thisEffect.final IntegerPropertyThe number of times to iterate the blur effect to improve its "quality" or "smoothness".final voidsetHeight(double value) Sets the value of theheightproperty.final voidSets the value of theinputproperty.final voidsetIterations(int value) Sets the value of theiterationsproperty.final voidsetWidth(double value) Sets the value of thewidthproperty.final DoublePropertyThe horizontal dimension of the blur effect.
- 
Property Details- 
inputThe 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:
 
- 
widthThe horizontal dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated width centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect.Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0- Default value:
- 5.0
- See Also:
 
- 
heightThe vertical dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated height centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect.Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0- Default value:
- 5.0
- See Also:
 
- 
iterationsThe number of times to iterate the blur effect to improve its "quality" or "smoothness". Iterating the effect 3 times approximates the quality of a Gaussian Blur to within 3%.Min: 0 Max: 3 Default: 1 Identity: 0- Default value:
- 1
- See Also:
 
 
- 
- 
Constructor Details- 
BoxBlurpublic BoxBlur()Creates a new instance of BoxBlur with default parameters.
- 
BoxBlurpublic BoxBlur(double width, double height, int iterations) Creates a new instance of BoxBlur with specified width, height and iterations.- Parameters:
- width- the horizontal dimension of the blur effect
- height- the vertical dimension of the blur effect
- iterations- the number of times to iterate the blur effect to improve its "quality" or "smoothness"
 
 
- 
- 
Method Details- 
setInputSets the value of theinputproperty.- 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
- Parameters:
- value- the value for the- inputproperty
- See Also:
 
- 
getInputGets the value of theinputproperty.- 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
- Returns:
- the value of the inputproperty
- See Also:
 
- 
inputPropertyThe 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
- Returns:
- the inputproperty
- See Also:
 
- 
setWidthpublic final void setWidth(double value) Sets the value of thewidthproperty.- Property description:
- The horizontal dimension of the blur effect.
 The color information for a given pixel will be spread across
 a Box of the indicated width centered over the pixel.
 Values less than or equal to 1 will not spread the color data
 beyond the pixel where it originated from and so will have
 no effect.
 Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
- Default value:
- 5.0
- Parameters:
- value- the value for the- widthproperty
- See Also:
 
- 
getWidthpublic final double getWidth()Gets the value of thewidthproperty.- Property description:
- The horizontal dimension of the blur effect.
 The color information for a given pixel will be spread across
 a Box of the indicated width centered over the pixel.
 Values less than or equal to 1 will not spread the color data
 beyond the pixel where it originated from and so will have
 no effect.
 Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
- Default value:
- 5.0
- Returns:
- the value of the widthproperty
- See Also:
 
- 
widthPropertyThe horizontal dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated width centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect.Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0- Default value:
- 5.0
- Returns:
- the widthproperty
- See Also:
 
- 
setHeightpublic final void setHeight(double value) Sets the value of theheightproperty.- Property description:
- The vertical dimension of the blur effect.
 The color information for a given pixel will be spread across
 a Box of the indicated height centered over the pixel.
 Values less than or equal to 1 will not spread the color data
 beyond the pixel where it originated from and so will have
 no effect.
 Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
- Default value:
- 5.0
- Parameters:
- value- the value for the- heightproperty
- See Also:
 
- 
getHeightpublic final double getHeight()Gets the value of theheightproperty.- Property description:
- The vertical dimension of the blur effect.
 The color information for a given pixel will be spread across
 a Box of the indicated height centered over the pixel.
 Values less than or equal to 1 will not spread the color data
 beyond the pixel where it originated from and so will have
 no effect.
 Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
- Default value:
- 5.0
- Returns:
- the value of the heightproperty
- See Also:
 
- 
heightPropertyThe vertical dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated height centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect.Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0- Default value:
- 5.0
- Returns:
- the heightproperty
- See Also:
 
- 
setIterationspublic final void setIterations(int value) Sets the value of theiterationsproperty.- Property description:
- The number of times to iterate the blur effect to improve its
 "quality" or "smoothness".
 Iterating the effect 3 times approximates the quality of a
 Gaussian Blur to within 3%.
 Min: 0 Max: 3 Default: 1 Identity: 0
- Default value:
- 1
- Parameters:
- value- the value for the- iterationsproperty
- See Also:
 
- 
getIterationspublic final int getIterations()Gets the value of theiterationsproperty.- Property description:
- The number of times to iterate the blur effect to improve its
 "quality" or "smoothness".
 Iterating the effect 3 times approximates the quality of a
 Gaussian Blur to within 3%.
 Min: 0 Max: 3 Default: 1 Identity: 0
- Default value:
- 1
- Returns:
- the value of the iterationsproperty
- See Also:
 
- 
iterationsPropertyThe number of times to iterate the blur effect to improve its "quality" or "smoothness". Iterating the effect 3 times approximates the quality of a Gaussian Blur to within 3%.Min: 0 Max: 3 Default: 1 Identity: 0- Default value:
- 1
- Returns:
- the iterationsproperty
- See Also:
 
 
-