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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public ScaleBuilder z(double value)
      A builder method that invokes the setZ method on the instance being constructed.
      Returns:
      builder instance
    • identityPropertyApply

      public ScaleBuilder 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 ScaleBuilder 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 ScaleBuilder 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 ScaleBuilder 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 ScaleBuilder 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 ScaleBuilder 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
    • xPropertyApply

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

      Returns:
      builder instance
    • yPropertyApply

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

      Returns:
      builder instance
    • zPropertyApply

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

      Example:

      Returns:
      builder instance