java.lang.Object
io.github.sosuisen.jfxbuilder.controls.AxisTickMarkBuilder<T>

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

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

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

      public AxisTickMarkBuilder<T> apply(Consumer<Axis.TickMark<T>> func)
      Applies a function to the TickMark instance being constructed. Most operations on the instance can be performed using this method.
      Returns:
      builder instance
    • label

      public AxisTickMarkBuilder<T> label(String value)
      A builder method that invokes the setLabel method on the instance being constructed.
      Returns:
      builder instance
    • position

      public AxisTickMarkBuilder<T> position(double value)
      A builder method that invokes the setPosition method on the instance being constructed.
      Returns:
      builder instance
    • textVisible

      public AxisTickMarkBuilder<T> textVisible(boolean value)
      A builder method that invokes the setTextVisible method on the instance being constructed.
      Returns:
      builder instance
    • value

      public AxisTickMarkBuilder<T> value(T v)
      A builder method that invokes the setValue method on the instance being constructed.
      Returns:
      builder instance
    • labelPropertyApply

      public AxisTickMarkBuilder<T> labelPropertyApply(Consumer<StringExpression> op)
      Applies a function to the labelProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      Returns:
      builder instance
    • positionPropertyApply

      public AxisTickMarkBuilder<T> positionPropertyApply(Consumer<DoubleExpression> op)
      Applies a function to the positionProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      Returns:
      builder instance
    • valuePropertyApply

      public AxisTickMarkBuilder<T> valuePropertyApply(Consumer<ObjectExpression<T>> op)
      Applies a function to the valueProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      Returns:
      builder instance