public class FieldData extends Object
The instances of FieldData
class are used in DocumentData
collection.
Constructor and Description |
---|
FieldData(String name,
PageArea pageArea)
Initializes a new instance of the
FieldData class. |
FieldData(String name,
PageArea pageArea,
FieldData linkedField)
Initializes a new instance of the
FieldData class. |
Modifier and Type | Method and Description |
---|---|
FieldData |
getLinkedField()
Gets the linked field.
|
String |
getName()
Gets the field name.
|
PageArea |
getPageArea()
Gets the value of the field.
|
int |
getPageIndex()
Gets the page index.
|
String |
getText()
Gets the text.
|
public FieldData(String name, PageArea pageArea)
FieldData
class.name
- The name of the field.pageArea
- The value of the field.public String getName()
public int getPageIndex()
public PageArea getPageArea()
Depending on field PageArea property can contain any of the inheritors of PageArea
class.
For example, Parser.parseForm()
method extracts only text fields.
PageTextArea area = field.getPageArea() instanceof PageTextArea
? (PageTextArea) field.getPageArea()
: null;
System.out.println(area == null ? "Not a template field" : area.getText());
PageArea
class that represents the value of the field.public FieldData getLinkedField()
FieldData
class that represents the field which is linked to the field; null
if it isn't set.public String getText()
null
if PageArea
property isn't PageTextArea
.