Class PerspectiveTransformBuilder

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

public class PerspectiveTransformBuilder extends Object
The PerspectiveTransformBuilder class constructs instances of the PerspectiveTransform 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 PerspectiveTransform constructor and returns an instance of the PerspectiveTransformBuilder.

You can use method chaining to call the builder methods for configuring the PerspectiveTransform. Finally, invoke the build method to generate an instance of the PerspectiveTransform 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 PerspectiveTransformBuilder create()
      Returns an instance of the PerspectiveTransformBuilder.
      Returns:
      an instance of the PerspectiveTransformBuilder.
    • create

      public static PerspectiveTransformBuilder create(double ulx, double uly, double urx, double ury, double lrx, double lry, double llx, double lly)
      Accepts the constructor arguments of PerspectiveTransform(double, double, double, double, double, double, double, double) and returns an instance of PerspectiveTransformBuilder.
      Returns:
      an instance of the PerspectiveTransformBuilder.
    • build

      public PerspectiveTransform build()
      Builds and returns an instance of the PerspectiveTransform 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 PerspectiveTransform class
    • apply

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

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

      public PerspectiveTransformBuilder llx(double value)
      A builder method that invokes the setLlx method on the instance being constructed.
      Returns:
      builder instance
    • lly

      public PerspectiveTransformBuilder lly(double value)
      A builder method that invokes the setLly method on the instance being constructed.
      Returns:
      builder instance
    • lrx

      public PerspectiveTransformBuilder lrx(double value)
      A builder method that invokes the setLrx method on the instance being constructed.
      Returns:
      builder instance
    • lry

      public PerspectiveTransformBuilder lry(double value)
      A builder method that invokes the setLry method on the instance being constructed.
      Returns:
      builder instance
    • ulx

      public PerspectiveTransformBuilder ulx(double value)
      A builder method that invokes the setUlx method on the instance being constructed.
      Returns:
      builder instance
    • uly

      public PerspectiveTransformBuilder uly(double value)
      A builder method that invokes the setUly method on the instance being constructed.
      Returns:
      builder instance
    • urx

      public PerspectiveTransformBuilder urx(double value)
      A builder method that invokes the setUrx method on the instance being constructed.
      Returns:
      builder instance
    • ury

      public PerspectiveTransformBuilder ury(double value)
      A builder method that invokes the setUry method on the instance being constructed.
      Returns:
      builder instance
    • inputPropertyApply

      public PerspectiveTransformBuilder 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
    • llxPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.llxProperty().bind(anotherProperty))
      
      // Use shorthand form
      .llxPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • llyPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.llyProperty().bind(anotherProperty))
      
      // Use shorthand form
      .llyPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • lrxPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.lrxProperty().bind(anotherProperty))
      
      // Use shorthand form
      .lrxPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • lryPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.lryProperty().bind(anotherProperty))
      
      // Use shorthand form
      .lryPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • ulxPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.ulxProperty().bind(anotherProperty))
      
      // Use shorthand form
      .ulxPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • ulyPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.ulyProperty().bind(anotherProperty))
      
      // Use shorthand form
      .ulyPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • urxPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.urxProperty().bind(anotherProperty))
      
      // Use shorthand form
      .urxPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • uryPropertyApply

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

      Example:

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