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

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

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

      public static CubicCurveToBuilder create(double controlX1, double controlY1, double controlX2, double controlY2, double x, double y)
      Accepts the constructor arguments of CubicCurveTo(double, double, double, double, double, double) and returns an instance of CubicCurveToBuilder.
      Returns:
      an instance of the CubicCurveToBuilder.
    • build

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

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

      public CubicCurveToBuilder absolute(boolean value)
      A builder method that invokes the setAbsolute method on the instance being constructed.
      Returns:
      builder instance
    • controlX1

      public CubicCurveToBuilder controlX1(double value)
      A builder method that invokes the setControlX1 method on the instance being constructed.
      Returns:
      builder instance
    • controlX2

      public CubicCurveToBuilder controlX2(double value)
      A builder method that invokes the setControlX2 method on the instance being constructed.
      Returns:
      builder instance
    • controlY1

      public CubicCurveToBuilder controlY1(double value)
      A builder method that invokes the setControlY1 method on the instance being constructed.
      Returns:
      builder instance
    • controlY2

      public CubicCurveToBuilder controlY2(double value)
      A builder method that invokes the setControlY2 method on the instance being constructed.
      Returns:
      builder instance
    • x

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

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

      public CubicCurveToBuilder absolutePropertyApply(Consumer<BooleanProperty> op)
      Applies a function to the absoluteProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.absoluteProperty().bind(anotherProperty))
      
      // Use shorthand form
      .absolutePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • controlX1PropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.controlX1Property().bind(anotherProperty))
      
      // Use shorthand form
      .controlX1PropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • controlX2PropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.controlX2Property().bind(anotherProperty))
      
      // Use shorthand form
      .controlX2PropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • controlY1PropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.controlY1Property().bind(anotherProperty))
      
      // Use shorthand form
      .controlY1PropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • controlY2PropertyApply

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

      Example:

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

      public CubicCurveToBuilder 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 CubicCurveToBuilder 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