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

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

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

      public static RotateBuilder create(double angle)
      Accepts the constructor arguments of Rotate(double) and returns an instance of RotateBuilder.
      Returns:
      an instance of the RotateBuilder.
    • create

      public static RotateBuilder create(double angle, double pivotX, double pivotY)
      Accepts the constructor arguments of Rotate(double, double, double) and returns an instance of RotateBuilder.
      Returns:
      an instance of the RotateBuilder.
    • create

      public static RotateBuilder create(double angle, double pivotX, double pivotY, double pivotZ)
      Accepts the constructor arguments of Rotate(double, double, double, double) and returns an instance of RotateBuilder.
      Returns:
      an instance of the RotateBuilder.
    • create

      public static RotateBuilder create(double angle, double pivotX, double pivotY, double pivotZ, Point3D axis)
      Accepts the constructor arguments of Rotate(double, double, double, double, Point3D) and returns an instance of RotateBuilder.
      Returns:
      an instance of the RotateBuilder.
    • create

      public static RotateBuilder create(double angle, Point3D axis)
      Accepts the constructor arguments of Rotate(double, Point3D) and returns an instance of RotateBuilder.
      Returns:
      an instance of the RotateBuilder.
    • build

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

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

      public RotateBuilder angle(double value)
      A builder method that invokes the setAngle method on the instance being constructed.
      Returns:
      builder instance
    • axis

      public RotateBuilder axis(Point3D value)
      A builder method that invokes the setAxis method on the instance being constructed.
      Returns:
      builder instance
    • onTransformChanged

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

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

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

      public RotateBuilder pivotZ(double value)
      A builder method that invokes the setPivotZ method on the instance being constructed.
      Returns:
      builder instance
    • anglePropertyApply

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

      Example:

      Returns:
      builder instance
    • axisPropertyApply

      public RotateBuilder axisPropertyApply(Consumer<ObjectProperty<Point3D>> op)
      Applies a function to the axisProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      Returns:
      builder instance
    • identityPropertyApply

      public RotateBuilder 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:

      Returns:
      builder instance
    • onTransformChangedPropertyApply

      public RotateBuilder 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:

      Returns:
      builder instance
    • pivotXPropertyApply

      public RotateBuilder 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:

      Returns:
      builder instance
    • pivotYPropertyApply

      public RotateBuilder 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:

      Returns:
      builder instance
    • pivotZPropertyApply

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

      Example:

      Returns:
      builder instance
    • type2DPropertyApply

      public RotateBuilder 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:

      Returns:
      builder instance