public class TextInputDialog extends DialogWindow
TextInputDialog
is a modal text input dialog that prompts the user to enter a text string. The class supports
validation and password masking. The builder class to help setup TextInputDialog
s is
TextInputDialogBuilder
.AbstractBasePane.ContentHolder
Window.Hint
contentHolder, interactableLookupMap
Modifier and Type | Method | Description |
---|---|---|
String |
showDialog(WindowBasedTextGUI textGUI) |
Opens the dialog by showing it on the GUI and doesn't return until the dialog has been closed
|
static String |
showDialog(WindowBasedTextGUI textGUI,
String title,
String description,
String initialContent) |
Shortcut for quickly showing a
TextInputDialog |
static BigInteger |
showNumberDialog(WindowBasedTextGUI textGUI,
String title,
String description,
String initialContent) |
Shortcut for quickly showing a
TextInputDialog that only accepts numbers |
static String |
showPasswordDialog(WindowBasedTextGUI textGUI,
String title,
String description,
String initialContent) |
Shortcut for quickly showing a
TextInputDialog with password masking |
addBasePaneListener, getBasePaneListeners, getComponent, getCursorPosition, getFocusedInteractable, getTheme, invalidate, isInvalid, removeBasePaneListener, setComponent, setEnableDirectionBasedMovements, setFocusedInteractable, setFocusedInteractable, setStrictFocusChange, setTheme
addWindowListener, close, draw, fromGlobal, getDecoratedSize, getHints, getPosition, getPostRenderer, getPreferredSize, getSize, getTextGUI, getTitle, handleInput, isVisible, removeWindowListener, setCloseWindowWithEscape, setContentOffset, setDecoratedSize, setFixedSize, setHints, setPosition, setSize, setTextGUI, setTitle, setWindowPostRenderer, setVisible, toGlobal, waitUntilClosed
getTheme, setEnableDirectionBasedMovements, setStrictFocusChange, setTheme
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponent, getCursorPosition, getFocusedInteractable, invalidate, isInvalid, setComponent, setFocusedInteractable
public String showDialog(WindowBasedTextGUI textGUI)
DialogWindow
showDialog
in class DialogWindow
textGUI
- Text GUI to add the dialog toDialogWindow
implementation, by default null
public static String showDialog(WindowBasedTextGUI textGUI, String title, String description, String initialContent)
TextInputDialog
textGUI
- GUI to show the dialog ontitle
- Title of the dialogdescription
- Description of the dialoginitialContent
- What content to place in the text box initiallynull
if the dialog was cancelledpublic static BigInteger showNumberDialog(WindowBasedTextGUI textGUI, String title, String description, String initialContent)
TextInputDialog
that only accepts numberstextGUI
- GUI to show the dialog ontitle
- Title of the dialogdescription
- Description of the dialoginitialContent
- What content to place in the text box initiallynull
if the dialog was cancelledpublic static String showPasswordDialog(WindowBasedTextGUI textGUI, String title, String description, String initialContent)
TextInputDialog
with password maskingtextGUI
- GUI to show the dialog ontitle
- Title of the dialogdescription
- Description of the dialoginitialContent
- What content to place in the text box initiallynull
if the dialog was cancelledCopyright © 2020. All rights reserved.