Class TextInputDialogBuilder

    • Constructor Detail

      • TextInputDialogBuilder

        public TextInputDialogBuilder()
        Default constructor
    • Method Detail

      • setInitialContent

        public TextInputDialogBuilder setInitialContent​(java.lang.String initialContent)
        Sets the initial content the dialog will have
        Parameters:
        initialContent - Initial content the dialog will have
        Returns:
        Itself
      • getInitialContent

        public java.lang.String getInitialContent()
        Returns the initial content the dialog will have
        Returns:
        Initial content the dialog will have
      • setTextBoxSize

        public TextInputDialogBuilder setTextBoxSize​(TerminalSize textBoxSize)
        Sets the size of the text box the dialog will have
        Parameters:
        textBoxSize - Size of the text box the dialog will have
        Returns:
        Itself
      • getTextBoxSize

        public TerminalSize getTextBoxSize()
        Returns the size of the text box the dialog will have
        Returns:
        Size of the text box the dialog will have
      • setValidator

        public TextInputDialogBuilder setValidator​(TextInputDialogResultValidator validator)
        Sets the validator that will be attached to the text box in the dialog
        Parameters:
        validator - Validator that will be attached to the text box in the dialog
        Returns:
        Itself
      • getValidator

        public TextInputDialogResultValidator getValidator()
        Returns the validator that will be attached to the text box in the dialog
        Returns:
        validator that will be attached to the text box in the dialog
      • setValidationPattern

        public TextInputDialogBuilder setValidationPattern​(java.util.regex.Pattern pattern,
                                                           java.lang.String errorMessage)
        Helper method that assigned a validator to the text box the dialog will have which matches the pattern supplied
        Parameters:
        pattern - Pattern to validate the text box
        errorMessage - Error message to show when the pattern doesn't match
        Returns:
        Itself
      • setPasswordInput

        public TextInputDialogBuilder setPasswordInput​(boolean passwordInput)
        Sets if the text box the dialog will have contains a password and should be masked (default: false)
        Parameters:
        passwordInput - true if the text box should be password masked, false otherwise
        Returns:
        Itself
      • isPasswordInput

        public boolean isPasswordInput()
        Returns true if the text box the dialog will have contains a password and should be masked
        Returns:
        true if the text box the dialog will have contains a password and should be masked