The preferred height of a text field is the height of the TextFieldStyle#font and TextFieldStyle#background.
The preferred width of a text field is 150, a relatively arbitrary size.
The text field will copy the currently selected text when ctrl+c is pressed, and paste any text in the clipboard when ctrl+v is
pressed. Clipboard functionality is provided via the Clipboard interface. Currently there are two standard
implementations, one for the desktop and one for Android. The Android clipboard is a stub, as copy & pasting on Android is not
supported yet.
The text field allows you to specify an OnscreenKeyboard for displaying a softkeyboard and piping all key events
generated by the keyboard to the text field. There are two standard implementations, one for the desktop and one for Android.
The desktop keyboard is a stub, as a softkeyboard is not needed on the desktop. The Android OnscreenKeyboard
implementation will bring up the default IME.
| Modifier and Type | Class and Description |
|---|---|
| public static class | TextField.
The default |
| pack-priv class | |
| public static class | TextField.
An advanced |
| public static interface | TextField.
An interface for onscreen keyboards. |
| public class | TextField.
Basic input listener for the text field |
| public static interface | TextField.
Interface for filtering characters entered into the text field. |
| public static interface | TextField.
Interface for listening to typed characters. |
| public static class | TextField.
The style for a text field, see |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| protected static final char | |
| pack-priv final Timer. | |
| pack-priv float | |
| protected static final char | BULLET
This is the default char used in password fields, a Unicode bullet at code point 0x2022. |
| protected static final char | |
| pack-priv Clipboard | |
| protected int | |
| pack-priv boolean | |
| public static TextField. | |
| protected static final char | |
| pack-priv boolean | |
| protected CharSequence | |
| pack-priv TextField. | |
| pack-priv boolean | |
| pack-priv boolean | |
| protected float | |
| protected final FloatArray | |
| protected boolean | |
| pack-priv InputListener | |
| pack-priv TextField. | |
| private Input. | |
| public static float | |
| pack-priv final TextField. | |
| public static float | |
| protected final GlyphLayout | |
| pack-priv TextField. | |
| private int | |
| private String | |
| protected static final char | |
| pack-priv boolean | |
| private StringBuilder | |
| private char | |
| pack-priv boolean | |
| private boolean | |
| pack-priv boolean | |
| pack-priv float | |
| protected int | |
| private float | |
| private float | |
| pack-priv TextField. | |
| protected static final char | |
| protected String | |
| private int | |
| protected float | |
| protected float | |
| private static final Vector2 | |
| private static final Vector2 | |
| private static final Vector2 | |
| private final TextField. | |
| public static int | |
| protected int | |
| protected int | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| pack-priv boolean | |
| public void | |
| protected boolean | |
| public void | |
| protected InputListener | |
| public void | |
| pack-priv void | |
| pack-priv int | |
| public void | draw(Batch batch, float parentAlpha)
Overrides com. If this method is overridden, the super method or |
| protected void | |
| protected void | |
| protected void | |
| protected void | drawSelection(Drawable selection, Batch batch, BitmapFont font, float x, float y)
Draws selection rectangle |
| protected void | |
| private TextField | |
| public int | |
| protected Drawable | |
| public int | |
| public InputListener | |
| public boolean | |
| public int | |
| public String | |
| public TextField. | |
| public float | |
| public float | |
| public boolean | |
| public String | |
| public int | |
| public TextField. | getStyle()
Implements com. Returns the text field's style. |
| public String | |
| public TextField. | |
| protected float | |
| protected void | |
| pack-priv String | |
| public boolean | |
| public boolean | |
| protected boolean | |
| protected int | |
| protected void | |
| public TextField | Returns: The textfield, the focus has been transferred tooIf true, the text field with the same or next smallest y coordinate is found, else the next highest. up)Sets the |
| pack-priv void | |
| public void | |
| pack-priv void | |
| public void | |
| public void | |
| public void | setAutocompleteOptions(String[] autocompleteOptions)
A list of possible strings that are valid to autocomplete Currently only has an effect on mobile with
|
| public void | |
| public void | |
| public void | |
| public void | setDisabled(boolean disabled)
Implements com.
|
| public void | setFocusTraversal(boolean focusTraversal)
If true (the default), tab/shift+tab will move to the next text field. |
| public void | |
| public void | |
| public void | setMessageText(String
may be null. messageText)Sets the text that will be drawn in the text field if no text has been entered. |
| public void | setOnlyFontChars(boolean onlyFontChars)
When false, text set by |
| public void | |
| public void | |
| public void | setPasswordMode(boolean passwordMode)
If true, the text in this text field will be shown as bullet characters. |
| public void | setPreventAutoCorrection(boolean preventAutoCorrection)
Whether if auto correction is provided by the system, it should be surpressed Will be considered true, if
|
| public void | setProgrammaticChangeEvents(boolean programmaticChangeEvents)
If false, methods that change the text will not fire |
| public void | |
| public void | setStyle(TextField.
Implements com. Set the current style of the actor |
| public void | |
| public void | |
| public void | |
| public void | |
| pack-priv void | |
| protected void | |
| pack-priv boolean | |
| protected int[] | |
| pack-priv int[] |