public class DefaultTextField extends AbstractField
Field interface. It stores the text
of the field as a String.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_NAME
The default name for the field is the empty string.
|
protected java.lang.String |
text
The text content of the field.
|
name| Constructor and Description |
|---|
DefaultTextField()
Creates a new
DefaultTextField with default name and text, both
of which are the empty string. |
DefaultTextField(java.lang.String name,
java.lang.String text)
Creates a new
DefaultTextField with the given name and text. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getText()
Gets the full text of the field.
|
void |
setText(java.lang.String text)
Sets the text content for the field.
|
readText, toStringclone, getName, setNamepublic static final java.lang.String DEFAULT_NAME
protected java.lang.String text
public DefaultTextField()
DefaultTextField with default name and text, both
of which are the empty string.public DefaultTextField(java.lang.String name,
java.lang.String text)
DefaultTextField with the given name and text.name - The name of the field.text - The text content for the field.public java.lang.String getText()
Fieldpublic void setText(java.lang.String text)
text - The text content for the field.