FieldInput

public final class FieldInput extends Field

Adds an editable text input to an Input.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

FieldInput(String name, String text)

Public Method Summary

FieldInput
clone()
static FieldInput
fromJson(JSONObject json)
String
String
boolean
setFromString(String text)
Sets the values of the field from a string.
void
setText(String text)
Sets the current text in this Field.

Inherited Method Summary

Public Constructors

public FieldInput (String name, String text)

Parameters
name
text

Public Methods

public FieldInput clone ()

public static FieldInput fromJson (JSONObject json)

Parameters
json

public String getSerializedValue ()

Returns
  • The value serialized into a string.

public String getText ()

Returns
  • The text the user has entered.

public boolean setFromString (String text)

Sets the values of the field from a string.

This is used for setting values of all types of fields when loading a workspace from XML. It is also used, however, as the primary means of setting text fields (e.g., inputs, labels, dates).

There should be a concrete implementation for each field type.

Parameters
text The text value for this field from the XML.
Returns
  • True if the value was set, false otherwise.

public void setText (String text)

Sets the current text in this Field.

Parameters
text The text to replace the field content with.