public interface TextField extends NiftyControl
Modifier and Type | Field and 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 and 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 . |
String |
getDisplayedText()
Get the text that is displayed in the text field.
|
String |
getRealText()
Get the text that was typed in by the user into the text field.
|
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(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, setWidth
static 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 withString getDisplayedText()
String getRealText()
enableInputFilter(TextFieldInputFilter)
its possible that this text does not equal the text that is actually
displayed in the text field.@Deprecated 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(TextFieldInputFilter filter)
filter
- the new filter or null
to reset to the default filter that allows all inputvoid enableInputFilter(TextFieldInputCharFilter filter)
filter
- the new filter or null
to reset to the default filter that allows all inputvoid enableInputFilter(TextFieldInputCharSequenceFilter filter)
filter
- the new filter or null
to reset to the default filter that allows all inputvoid disableInputFilter()
void enableDeleteFilter(TextFieldDeleteFilter filter)
filter
- the new filter or null
to reset to the default filter that allows all delete operationsvoid disableDeleteFilter()
void setFormat(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(CharSequence text)
text
- the text that is supposed to be displayedCopyright © 2013. All Rights Reserved.