TextField Class
A text field that is a part of a text run.
Declaration
public class TextField extends OfficeTextRunString
Remarks
The following code snippet adds a text field to a paragraph:
import com.devexpress.docs.presentation.*;
import com.devexpress.docs.office.*;
//...
// Add a text field to the paragraph.
TextField field = new TextField("Field value.");
TextParagraph textParagraph = shape
.getTextArea()
.getParagraphs()
.getFirst();
textParagraph.getRuns().add(field);
Inherited Members
Inheritance
Constructors
TextField() Constructor
Initializes a new instance of the TextField class.
Declaration
public TextField()
TextField(String text, TextProperties textProperties) Constructor
Initializes a new instance of the TextField class with specified settings.
Declaration
public TextField(String text, TextProperties textProperties)
Parameters
| Name | Type | Description |
|---|---|---|
| text | String | The text content of the text field. |
| textProperties | TextProperties | Text properties to apply to the text field. |
TextField(String text) Constructor
Initializes a new instance of the TextField class with specified settings.
Declaration
public TextField(String text)
Parameters
| Name | Type | Description |
|---|---|---|
| text | String | The text content of the text field. |
Methods
deepClone() Method
Returns a deep copy of this TextField instance.
Declaration
public TextField deepClone()
Returns
| Type | Description |
|---|---|
TextField |
A deep copy of this |
getFieldType() Method
Returns the type of a text field.
Declaration
public TextFieldType getFieldType()
Returns
| Type | Description |
|---|---|
| TextFieldType | The type of the text field. |
getParagraphProperties() Method
Returns the paragraph properties of a text field.
Declaration
public TextParagraphProperties getParagraphProperties()
Returns
| Type | Description |
|---|---|
| TextParagraphProperties | Paragraph properties of the text field. |
setFieldType(TextFieldType value) Method
Sets the type of a text field.
Declaration
public void setFieldType(TextFieldType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextFieldType | The type of the text field. |
setParagraphProperties(TextParagraphProperties value) Method
Sets the paragraph properties of a text field.
Declaration
public void setParagraphProperties(TextParagraphProperties value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextParagraphProperties | Paragraph properties to apply to the text field. |