public class TdbTextField extends TdbField
| Constructor and Description |
|---|
TdbTextField(java.lang.String name)
Constructor, creates a blank instance based on the name provided
|
TdbTextField(TdbFieldTemplate tmpl)
Constructor, creates a blank instance based on the template provided
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendText(java.lang.String val)
Text-specific function to append to the current value of a text field.
|
void |
appendValue(java.lang.String val)
Append the provided paragraph text to the field's value
This method cannot be used after any calls have been made to setText() or appendText() as the field is no longer defined in terms of paragraphs at that point. |
void |
appendValues(java.util.Collection<java.lang.String> values)
Append several paragraphs to this text field.
|
void |
clear()
Clear any existing state the field might have
|
int |
getFieldSize()
Retrieve the size of the value in the field.
|
java.lang.String |
getText()
Get the complete content of the field.
|
TdbTextExtractionInfo |
getTextExtractionInfo()
Provides access to an object that allows control and enabling of
text extraction operations on this TExt field.
|
TdbFieldType |
getType()
Retrieve the field type
|
java.lang.String |
getValue(int index)
Retrieve the value of the n'th paragraph.
|
int |
getValueCount()
Retrieve the number of paragraphs in the field.
|
void |
insertValue(int index,
java.lang.String value)
Inserts a new paragraph into the field.
|
void |
insertValues(int index,
java.util.Collection<java.lang.String> values)
Inserts several new paragraphs into the field.
|
boolean |
isChanged()
Returns the change status for the field.
|
boolean |
isFormatted()
Returns true if this TdbTextField contains a value produced
by an output format and thereby doesn't correspond to an
actual database field.
|
boolean |
isPartial()
Returns true if this TdbTextField contains a partial value.
|
java.util.List<java.lang.String> |
originalValues()
Retrieve the display form of the field, with the paragraphs being elements
within the collection returned.
|
void |
removeValue(int index)
Removes a paragraph from the field.
|
void |
setText(java.lang.String val)
Text-specific function to set the initial value of a text field to that provided.
|
void |
setValue(int index,
java.lang.String val)
Set the value of a specific paragraph to that provided.
|
java.lang.String |
toString()
Retrieves a two newline-delimited string representation of the display content
of the field
|
java.util.List<java.lang.String> |
values()
Retrieve the current content of the field -- refer to
TdbField.Values for more detail.
|
getName, getOwnerComponentpublic TdbTextField(TdbFieldTemplate tmpl)
tmpl - Field templatepublic TdbTextField(java.lang.String name)
name - Name of fieldpublic boolean isFormatted()
public boolean isPartial()
isPartial in class TdbFieldPartial values are typically produced when requesting a hit-focused so-called "teaser" value, e.g. for display in result lists.
Partial values should be considered read-only, even if the current user has write access to the field. Writing back a partial value will overwrite the existing full value, causing what amounts to data corruption.
public boolean isChanged()
public java.util.List<java.lang.String> originalValues()
originalValues in class TdbFieldpublic java.util.List<java.lang.String> values()
values in class TdbFieldTdbField.values()public java.lang.String getText()
public TdbFieldType getType()
public TdbTextExtractionInfo getTextExtractionInfo()
public void clear()
public int getFieldSize()
getFieldSize in class TdbFieldTdbField.getFieldSize()public java.lang.String getValue(int index)
throws TdbException
getValue in class TdbFieldindex - The index of the paragraph to retrieveTdbExceptionpublic void setValue(int index,
java.lang.String val)
throws TdbException
setValue in class TdbFieldindex - The offset of the paragraph to updateval - The value to establish as the paragraph's valueTdbExceptionpublic void appendValue(java.lang.String val)
throws TdbException
appendValue in class TdbFieldval - The paragraph value to append to the fieldTdbExceptionpublic void appendValues(java.util.Collection<java.lang.String> values)
throws TdbException
appendValues in class TdbFieldvalues - The paragraph values to append to the fieldTdbExceptionpublic int getValueCount()
throws TdbException
getValueCount in class TdbFieldTdbExceptionpublic void insertValue(int index,
java.lang.String value)
throws TdbException
insertValue in class TdbFieldindex - Zero-based index at which to insert the new paragraph.value - The value to insert into the field.TdbExceptionpublic void insertValues(int index,
java.util.Collection<java.lang.String> values)
throws TdbException
insertValues in class TdbFieldindex - Zero-based index at which to insert the new paragraphs.values - The values to insert into the field.TdbExceptionpublic void removeValue(int index)
throws TdbException
removeValue in class TdbFieldindex - Zero-based index of paragraph to remove.TdbExceptionpublic void setText(java.lang.String val)
val - The value the field should initially takepublic void appendText(java.lang.String val)
val - The value to append to the field's current value