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

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

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

      public static ShearBuilder create(double x, double y)
      Accepts the constructor arguments of Shear(double, double) and returns an instance of ShearBuilder.
      Returns:
      an instance of the ShearBuilder.
    • create

      public static ShearBuilder create(double x, double y, double pivotX, double pivotY)
      Accepts the constructor arguments of Shear(double, double, double, double) and returns an instance of ShearBuilder.
      Returns:
      an instance of the ShearBuilder.
    • build

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

      public ShearBuilder apply(Consumer<Shear> func)
      Applies a function to the Shear instance being constructed. Most operations on the instance can be performed using this method.
      Returns:
      builder instance
    • onTransformChanged

      public ShearBuilder onTransformChanged(EventHandler<? super TransformChangedEvent> value)
      A builder method that invokes the setOnTransformChanged method on the instance being constructed.
      Returns:
      builder instance
    • pivotX

      public ShearBuilder pivotX(double value)
      A builder method that invokes the setPivotX method on the instance being constructed.
      Returns:
      builder instance
    • pivotY

      public ShearBuilder pivotY(double value)
      A builder method that invokes the setPivotY method on the instance being constructed.
      Returns:
      builder instance
    • x

      public ShearBuilder x(double value)
      A builder method that invokes the setX method on the instance being constructed.
      Returns:
      builder instance
    • y

      public ShearBuilder y(double value)
      A builder method that invokes the setY method on the instance being constructed.
      Returns:
      builder instance
    • identityPropertyApply

      public ShearBuilder identityPropertyApply(Consumer<ReadOnlyBooleanProperty> op)
      Applies a function to the identityProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.identityProperty().bind(anotherProperty))
      
      // Use shorthand form
      .identityPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onTransformChangedPropertyApply

      public ShearBuilder onTransformChangedPropertyApply(Consumer<ObjectProperty<EventHandler<? super TransformChangedEvent>>> op)
      Applies a function to the onTransformChangedProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onTransformChangedProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onTransformChangedPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • pivotXPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.pivotXProperty().bind(anotherProperty))
      
      // Use shorthand form
      .pivotXPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • pivotYPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.pivotYProperty().bind(anotherProperty))
      
      // Use shorthand form
      .pivotYPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • type2DPropertyApply

      public ShearBuilder type2DPropertyApply(Consumer<ReadOnlyBooleanProperty> op)
      Applies a function to the type2DProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.type2DProperty().bind(anotherProperty))
      
      // Use shorthand form
      .type2DPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • xPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.xProperty().bind(anotherProperty))
      
      // Use shorthand form
      .xPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • yPropertyApply

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

      Example:

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