public interface KeyboardTextInput
| Modifier and Type | Method and Description |
|---|---|
KeyboardTextInput |
setErrorValidator(InputValidator<String> validator)
Sets an input validator for the virtual keyboard.
|
KeyboardTextInput |
setInitialValue(String initialText)
Sets the text which will be displayed when the virtual keyboard is shown.
|
void |
show(JButton component,
KeyboardInputCallback<String> callback)
This method requests the virtual keypad to be shown
|
void |
show(JLabel component,
KeyboardInputCallback<String> callback)
This method requests the virtual keypad to be shown
|
void |
show(JTextField component,
KeyboardInputCallback<String> callback)
This method requests the virtual keyboard to be shown
|
KeyboardTextInput setErrorValidator(InputValidator<String> validator)
InputValidationFactory.
Specifying an input validator is recommended, but optional.
In case InputValidator.isValid(Object) (in this case parameter is String) returns false, the accept
button on the virtual keyboard will be disabled and the error message from InputValidator.getMessage(Object)
(parameter is String) will be shown.
validator - the validator to be used to validate keyboard user input.NullPointerException - in case the validator is nullKeyboardTextInput setInitialValue(String initialText)
initialText - the initial text for the virtual keyboardvoid show(JTextField component, KeyboardInputCallback<String> callback)
component - the JTextField that will be used to define the screen position of the virtual keyboardcallback - the callback to be used when the user exits the keyboard by accepting or canceling the input.NullPointerException - in case any parameter is nullvoid show(JLabel component, KeyboardInputCallback<String> callback)
component - the JLabel that will be used to define the screen position of the virtual keyboardcallback - the callback to be used when the user exits the keyboard by accepting or canceling the input.NullPointerException - in case any parameter is nullvoid show(JButton component, KeyboardInputCallback<String> callback)
component - the JButton that will be used to define the screen position of the virtual keyboardcallback - the callback to be used when the user exits the keyboard by accepting or canceling the input.NullPointerException - in case any parameter is nullCopyright © 2018. All rights reserved.