NiftyControlTextFieldControlpublic interface TextField extends NiftyControl
| Modifier and Type | Field | Description |
|---|---|---|
static int |
UNLIMITED_LENGTH |
This is the constant the maximal length needs to be set to in order to set it to a unlimited.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
disableDeleteFilter() |
Reset the delete filter to the default one that simply allows all input.
|
void |
disableInputFilter() |
Disable any active input filter and start using the default input filter again.
|
void |
disablePasswordChar() |
Deprecated.
Use
setFormat(TextFieldDisplayFormat) with the argument null to reset the display
format |
void |
enableDeleteFilter(TextFieldDeleteFilter filter) |
Apply a filter to the delete operation on this text field.
|
void |
enableInputFilter(TextFieldInputCharFilter filter) |
Apply a filter to the input to this text field.
|
void |
enableInputFilter(TextFieldInputCharSequenceFilter filter) |
Apply a filter to the input to this text field.
|
void |
enableInputFilter(TextFieldInputFilter filter) |
Enable a filter to the input to this text field.
|
void |
enablePasswordChar(char passwordChar) |
Deprecated.
Rather then using this function apply a new text format using
(TextFieldDisplayFormat) with the FormatPassword. |
java.lang.String |
getDisplayedText() |
Get the text that is displayed in the text field.
|
java.lang.String |
getRealText() |
Get the text that was typed in by the user into the text field.
|
java.lang.String |
getText() |
Deprecated.
Better use
getRealText() |
boolean |
isPasswordCharEnabled() |
Deprecated.
There is no replacement. Void did not like it! Complain to him!
|
void |
setCursorPosition(int position) |
Set the cursor to a new location within the text field.
|
void |
setFormat(TextFieldDisplayFormat format) |
Apply a display format to this text field.
|
void |
setMaxLength(int maxLength) |
Set the maximal length in characters that applies for this text field.
|
void |
setText(java.lang.CharSequence text) |
Set the text that is supposed to be displayed in the text field.
|
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidthstatic final int UNLIMITED_LENGTH
@Deprecated void disablePasswordChar()
setFormat(TextFieldDisplayFormat) with the argument null to reset the display
format@Deprecated void enablePasswordChar(char passwordChar)
(TextFieldDisplayFormat) with the FormatPassword.passwordChar - the character all characters of the real text are replaced with@Nonnull java.lang.String getDisplayedText()
@Nonnull java.lang.String getRealText()
enableInputFilter(TextFieldInputFilter) its possible that this text does not equal the text that is actually
displayed in the text field.@Nonnull @Deprecated java.lang.String getText()
getRealText()@Deprecated boolean isPasswordCharEnabled()
true in case the actual input is hiddenvoid setCursorPosition(int position)
position - the new location of the cursorvoid enableInputFilter(@Nullable
TextFieldInputFilter filter)
filter - the new filter or null to reset to the default filter that allows all inputvoid enableInputFilter(@Nullable
TextFieldInputCharFilter filter)
filter - the new filter or null to reset to the default filter that allows all inputvoid enableInputFilter(@Nullable
TextFieldInputCharSequenceFilter filter)
filter - the new filter or null to reset to the default filter that allows all inputvoid disableInputFilter()
void enableDeleteFilter(@Nullable
TextFieldDeleteFilter filter)
filter - the new filter or null to reset to the default filter that allows all delete operationsvoid disableDeleteFilter()
void setFormat(@Nullable
TextFieldDisplayFormat format)
format - the new format or null to reset to the default format that simply displays the text that was
typed invoid setMaxLength(int maxLength)
maxLength - the maximal amount of characters allowed in this text field or UNLIMITED_LENGTH in case
no limit is supposed to be setvoid setText(@Nonnull
java.lang.CharSequence text)
text - the text that is supposed to be displayedCopyright © 2018. All rights reserved.