Class TextInputDialogBuilder

java.lang.Object
io.github.sosuisen.jfxbuilder.controls.TextInputDialogBuilder

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

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

      public static TextInputDialogBuilder create(String defaultValue)
      Accepts the constructor arguments of TextInputDialog(String) and returns an instance of TextInputDialogBuilder.
      Returns:
      an instance of the TextInputDialogBuilder.
    • build

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

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

      public TextInputDialogBuilder contentText(String contentText)
      A builder method that invokes the setContentText method on the instance being constructed.
      Returns:
      builder instance
    • dialogPane

      public TextInputDialogBuilder dialogPane(DialogPane value)
      A builder method that invokes the setDialogPane method on the instance being constructed.
      Returns:
      builder instance
    • graphic

      public TextInputDialogBuilder graphic(Node graphic)
      A builder method that invokes the setGraphic method on the instance being constructed.
      Returns:
      builder instance
    • headerText

      public TextInputDialogBuilder headerText(String headerText)
      A builder method that invokes the setHeaderText method on the instance being constructed.
      Returns:
      builder instance
    • height

      public TextInputDialogBuilder height(double height)
      A builder method that invokes the setHeight method on the instance being constructed.
      Returns:
      builder instance
    • onCloseRequest

      public TextInputDialogBuilder onCloseRequest(EventHandler<DialogEvent> value)
      A builder method that invokes the setOnCloseRequest method on the instance being constructed.
      Returns:
      builder instance
    • onHidden

      A builder method that invokes the setOnHidden method on the instance being constructed.
      Returns:
      builder instance
    • onHiding

      A builder method that invokes the setOnHiding method on the instance being constructed.
      Returns:
      builder instance
    • onShowing

      public TextInputDialogBuilder onShowing(EventHandler<DialogEvent> value)
      A builder method that invokes the setOnShowing method on the instance being constructed.
      Returns:
      builder instance
    • onShown

      A builder method that invokes the setOnShown method on the instance being constructed.
      Returns:
      builder instance
    • resizable

      public TextInputDialogBuilder resizable(boolean resizable)
      A builder method that invokes the setResizable method on the instance being constructed.
      Returns:
      builder instance
    • result

      public TextInputDialogBuilder result(String value)
      A builder method that invokes the setResult method on the instance being constructed.
      Returns:
      builder instance
    • resultConverter

      public TextInputDialogBuilder resultConverter(Callback<ButtonType, String> value)
      A builder method that invokes the setResultConverter method on the instance being constructed.
      Returns:
      builder instance
    • title

      public TextInputDialogBuilder title(String title)
      A builder method that invokes the setTitle method on the instance being constructed.
      Returns:
      builder instance
    • width

      public TextInputDialogBuilder width(double width)
      A builder method that invokes the setWidth method on the instance being constructed.
      Returns:
      builder instance
    • x

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

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

      public TextInputDialogBuilder contentTextPropertyApply(Consumer<StringProperty> op)
      Applies a function to the contentTextProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.contentTextProperty().bind(anotherProperty))
      
      // Use shorthand form
      .contentTextPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • dialogPanePropertyApply

      public TextInputDialogBuilder dialogPanePropertyApply(Consumer<ObjectProperty<DialogPane>> op)
      Applies a function to the dialogPaneProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.dialogPaneProperty().bind(anotherProperty))
      
      // Use shorthand form
      .dialogPanePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • graphicPropertyApply

      public TextInputDialogBuilder graphicPropertyApply(Consumer<ObjectProperty<Node>> op)
      Applies a function to the graphicProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.graphicProperty().bind(anotherProperty))
      
      // Use shorthand form
      .graphicPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • headerTextPropertyApply

      public TextInputDialogBuilder headerTextPropertyApply(Consumer<StringProperty> op)
      Applies a function to the headerTextProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.headerTextProperty().bind(anotherProperty))
      
      // Use shorthand form
      .headerTextPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • heightPropertyApply

      public TextInputDialogBuilder heightPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the heightProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.heightProperty().bind(anotherProperty))
      
      // Use shorthand form
      .heightPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onCloseRequestPropertyApply

      public TextInputDialogBuilder onCloseRequestPropertyApply(Consumer<ObjectProperty<EventHandler<DialogEvent>>> op)
      Applies a function to the onCloseRequestProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onCloseRequestProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onCloseRequestPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onHiddenPropertyApply

      Applies a function to the onHiddenProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onHiddenProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onHiddenPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onHidingPropertyApply

      Applies a function to the onHidingProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onHidingProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onHidingPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onShowingPropertyApply

      Applies a function to the onShowingProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onShowingProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onShowingPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onShownPropertyApply

      Applies a function to the onShownProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onShownProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onShownPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • resizablePropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.resizableProperty().bind(anotherProperty))
      
      // Use shorthand form
      .resizablePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • resultConverterPropertyApply

      public TextInputDialogBuilder resultConverterPropertyApply(Consumer<ObjectProperty<Callback<ButtonType, String>>> op)
      Applies a function to the resultConverterProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.resultConverterProperty().bind(anotherProperty))
      
      // Use shorthand form
      .resultConverterPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • resultPropertyApply

      public TextInputDialogBuilder resultPropertyApply(Consumer<ObjectProperty<String>> op)
      Applies a function to the resultProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.resultProperty().bind(anotherProperty))
      
      // Use shorthand form
      .resultPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • showingPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.showingProperty().bind(anotherProperty))
      
      // Use shorthand form
      .showingPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • titlePropertyApply

      public TextInputDialogBuilder titlePropertyApply(Consumer<StringProperty> op)
      Applies a function to the titleProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.titleProperty().bind(anotherProperty))
      
      // Use shorthand form
      .titlePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • widthPropertyApply

      public TextInputDialogBuilder widthPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the widthProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

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

      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

      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