Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public static final class Prompt.Text
- Object
- Prompt.Text
A text question with options: a default, a validator, masking.
Constructors
public Text(String question) | A text question. |
Methods
public Prompt.Text defaultValue(String value) | The answer an empty line gives, shown in the prompt. |
public Prompt.Text validator(Prompt.Validator validator) | Checks the answer before it is accepted. |
public Prompt.Text mask(char maskChar) | Hides the answer, echoing maskChar for each character, or nothing at all when it is 0. |
public Prompt.Text placeholder(String text) | Faint text shown while the answer is empty. |
public String ask() | Asks the question and answers what was typed. |
Inherited methods
Constructor details
Text
public Text(String question)A text question.
Method details
defaultValue
public Prompt.Text defaultValue(String value)The answer an empty line gives, shown in the prompt.
validator
public Prompt.Text validator(Prompt.Validator validator)Checks the answer before it is accepted.
mask
public Prompt.Text mask(char maskChar)Hides the answer, echoing
maskChar for each character, or nothing
at all when it is 0.placeholder
public Prompt.Text placeholder(String text)Faint text shown while the answer is empty.
ask
public String ask()Asks the question and answers what was typed.