BoxBlur (JavaFX 27)
Description: declaration: module: javafx.graphics, package: javafx.scene.effect, class: BoxBlur

# Class BoxBlur

java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.BoxBlur

public class BoxBlur extends Effect
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 Summary

  Properties
  Type
  Property
  Description
  `final DoubleProperty`
  `height`
  The vertical dimension of the blur effect.
  `final ObjectProperty<Effect>`
  `input`
  The input for this `Effect`.
  `final IntegerProperty`
  `iterations`
  The number of times to iterate the blur effect to improve its "quality" or "smoothness".
  `final DoubleProperty`
  `width`
  The horizontal dimension of the blur effect.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BoxBlur()`
  Creates a new instance of BoxBlur with default parameters.
  `BoxBlur(double width, double height, int iterations)`
  Creates a new instance of BoxBlur with specified width, height and iterations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final double`
  `getHeight()`
  Gets the value of the `height` property.
  `final Effect`
  `getInput()`
  Gets the value of the `input` property.
  `final int`
  `getIterations()`
  Gets the value of the `iterations` property.
  `final double`
  `getWidth()`
  Gets the value of the `width` property.
  `final DoubleProperty`
  `heightProperty()`
  The vertical dimension of the blur effect.
  `final ObjectProperty<Effect>`
  `inputProperty()`
  The input for this `Effect`.
  `final IntegerProperty`
  `iterationsProperty()`
  The number of times to iterate the blur effect to improve its "quality" or "smoothness".
  `final void`
  `setHeight(double value)`
  Sets the value of the `height` property.
  `final void`
  `setInput(Effect value)`
  Sets the value of the `input` property.
  `final void`
  `setIterations(int value)`
  Sets the value of the `iterations` property.
  `final void`
  `setWidth(double value)`
  Sets the value of the `width` property.
  `final DoubleProperty`
  `widthProperty()`
  The horizontal dimension of the blur effect.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Property Details

  - ### input

    public final ObjectProperty<Effect> inputProperty
    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
    See Also:
      - `getInput()`
      - `setInput(Effect)`
      - `inputProperty()`

  - ### width

    public final DoubleProperty widthProperty
    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
    See Also:
      - `getWidth()`
      - `setWidth(double)`
      - `widthProperty()`

  - ### height

    public final DoubleProperty heightProperty
    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
    See Also:
      - `getHeight()`
      - `setHeight(double)`
      - `heightProperty()`

  - ### iterations

    public final IntegerProperty iterationsProperty
    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
    See Also:
      - `getIterations()`
      - `setIterations(int)`
      - `iterationsProperty()`

- ## Constructor Details

  - ### BoxBlur

    public BoxBlur()
    Creates a new instance of BoxBlur with default parameters.

  - ### BoxBlur

    public 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

  - ### setInput

    public final void setInput(Effect value)
    Sets the value of the `input` property.
    Property description:
      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
    Parameters:
      `value` - the value for the `input` property
    See Also:
      - `getInput()`
      - `inputProperty()`

  - ### getInput

    public final Effect getInput()
    Gets the value of the `input` property.
    Property description:
      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
    Returns:
      the value of the `input` property
    See Also:
      - `setInput(Effect)`
      - `inputProperty()`

  - ### inputProperty

    public final ObjectProperty<Effect> inputProperty()
    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
    Returns:
      the `input` property
    See Also:
      - `getInput()`
      - `setInput(Effect)`

  - ### setWidth

    public final void setWidth(double value)
    Sets the value of the `width` property.
    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 `width` property
    See Also:
      - `getWidth()`
      - `widthProperty()`

  - ### getWidth

    public final double getWidth()
    Gets the value of the `width` property.
    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 `width` property
    See Also:
      - `setWidth(double)`
      - `widthProperty()`

  - ### widthProperty

    public final DoubleProperty widthProperty()
    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 `width` property
    See Also:
      - `getWidth()`
      - `setWidth(double)`

  - ### setHeight

    public final void setHeight(double value)
    Sets the value of the `height` property.
    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 `height` property
    See Also:
      - `getHeight()`
      - `heightProperty()`

  - ### getHeight

    public final double getHeight()
    Gets the value of the `height` property.
    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 `height` property
    See Also:
      - `setHeight(double)`
      - `heightProperty()`

  - ### heightProperty

    public final DoubleProperty heightProperty()
    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 `height` property
    See Also:
      - `getHeight()`
      - `setHeight(double)`

  - ### setIterations

    public final void setIterations(int value)
    Sets the value of the `iterations` property.
    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 `iterations` property
    See Also:
      - `getIterations()`
      - `iterationsProperty()`

  - ### getIterations

    public final int getIterations()
    Gets the value of the `iterations` property.
    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 `iterations` property
    See Also:
      - `setIterations(int)`
      - `iterationsProperty()`

  - ### iterationsProperty

    public final IntegerProperty iterationsProperty()
    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 `iterations` property
    See Also:
      - `getIterations()`
      - `setIterations(int)`