public class TextInputDialogBuilder extends AbstractDialogBuilder<TextInputDialogBuilder,TextInputDialog>
TextInputDialog
class, use this to create instances of that class and to customize
themdescription, extraWindowHints, title
Constructor | Description |
---|---|
TextInputDialogBuilder() |
Default constructor
|
Modifier and Type | Method | Description |
---|---|---|
protected TextInputDialog |
buildDialog() |
Builds the dialog according to the builder implementation
|
String |
getInitialContent() |
Returns the initial content the dialog will have
|
TerminalSize |
getTextBoxSize() |
Returns the size of the text box the dialog will have
|
TextInputDialogResultValidator |
getValidator() |
Returns the validator that will be attached to the text box in the dialog
|
boolean |
isPasswordInput() |
Returns
true if the text box the dialog will have contains a password and should be masked |
protected TextInputDialogBuilder |
self() |
Helper method for casting this to
type parameter B |
TextInputDialogBuilder |
setInitialContent(String initialContent) |
Sets the initial content the dialog will have
|
TextInputDialogBuilder |
setPasswordInput(boolean passwordInput) |
Sets if the text box the dialog will have contains a password and should be masked (default:
false ) |
TextInputDialogBuilder |
setTextBoxSize(TerminalSize textBoxSize) |
Sets the size of the text box the dialog will have
|
TextInputDialogBuilder |
setValidationPattern(Pattern pattern,
String errorMessage) |
Helper method that assigned a validator to the text box the dialog will have which matches the pattern supplied
|
TextInputDialogBuilder |
setValidator(TextInputDialogResultValidator validator) |
Sets the validator that will be attached to the text box in the dialog
|
build, getDescription, getExtraWindowHints, getTitle, setDescription, setExtraWindowHints, setTitle
protected TextInputDialogBuilder self()
AbstractDialogBuilder
type
parameter B
self
in class AbstractDialogBuilder<TextInputDialogBuilder,TextInputDialog>
this
as B
protected TextInputDialog buildDialog()
AbstractDialogBuilder
buildDialog
in class AbstractDialogBuilder<TextInputDialogBuilder,TextInputDialog>
public TextInputDialogBuilder setInitialContent(String initialContent)
initialContent
- Initial content the dialog will havepublic String getInitialContent()
public TextInputDialogBuilder setTextBoxSize(TerminalSize textBoxSize)
textBoxSize
- Size of the text box the dialog will havepublic TerminalSize getTextBoxSize()
public TextInputDialogBuilder setValidator(TextInputDialogResultValidator validator)
validator
- Validator that will be attached to the text box in the dialogpublic TextInputDialogResultValidator getValidator()
public TextInputDialogBuilder setValidationPattern(Pattern pattern, String errorMessage)
pattern
- Pattern to validate the text boxerrorMessage
- Error message to show when the pattern doesn't matchpublic TextInputDialogBuilder setPasswordInput(boolean passwordInput)
false
)passwordInput
- true
if the text box should be password masked, false
otherwisepublic boolean isPasswordInput()
true
if the text box the dialog will have contains a password and should be maskedtrue
if the text box the dialog will have contains a password and should be maskedCopyright © 2020. All rights reserved.