java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.GaussianBlurBuilder

public class GaussianBlurBuilder extends Object
The GaussianBlurBuilder class constructs instances of the GaussianBlur class and offers a fluent interface for creating and configuring it.

This class includes a static create method that accepts the same arguments as the original GaussianBlur constructor and returns an instance of the GaussianBlurBuilder.

You can use method chaining to call the builder methods for configuring the GaussianBlur. Finally, invoke the build method to generate an instance of the GaussianBlur class.

Note that intermediate builder methods are not evaluated until the build method is called, meaning they are evaluated lazily.

Author:
Hidekazu Kubota <hidekazu.kubota@gmail.com>
  • Method Details

    • create

      public static GaussianBlurBuilder create()
      Returns an instance of the GaussianBlurBuilder.
      Returns:
      an instance of the GaussianBlurBuilder.
    • create

      public static GaussianBlurBuilder create(double radius)
      Accepts the constructor arguments of GaussianBlur(double) and returns an instance of GaussianBlurBuilder.
      Returns:
      an instance of the GaussianBlurBuilder.
    • build

      public GaussianBlur build()
      Builds and returns an instance of the GaussianBlur class.

      Intermediate builder methods are not evaluated until the build method is called; in other words, they are evaluated lazily.

      Returns:
      new instance of the GaussianBlur class
    • apply

      Applies a function to the GaussianBlur instance being constructed. Most operations on the instance can be performed using this method.
      Returns:
      builder instance
    • input

      public GaussianBlurBuilder input(Effect value)
      A builder method that invokes the setInput method on the instance being constructed.
      Returns:
      builder instance
    • radius

      public GaussianBlurBuilder radius(double value)
      A builder method that invokes the setRadius method on the instance being constructed.
      Returns:
      builder instance
    • inputPropertyApply

      public GaussianBlurBuilder inputPropertyApply(Consumer<ObjectProperty<Effect>> op)
      Applies a function to the inputProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.inputProperty().bind(anotherProperty))
      
      // Use shorthand form
      .inputPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • radiusPropertyApply

      public GaussianBlurBuilder radiusPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the radiusProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.radiusProperty().bind(anotherProperty))
      
      // Use shorthand form
      .radiusPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance