public class PDNonTerminalField extends PDField
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
PDNonTerminalField(PDAcroForm acroForm)
Constructor.
|
PDNonTerminalField(PDAcroForm acroForm,
COSDictionary field,
PDNonTerminalField parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) FDFField |
exportFDF()
Exports this field and its children as FDF.
|
java.util.List<PDField> |
getChildren()
Returns this field's children.
|
COSBase |
getDefaultValue()
Returns the default value of this field.
|
int |
getFieldFlags()
This will get the flags for this field.
|
java.lang.String |
getFieldType()
Get the FT entry of the field.
|
COSBase |
getValue()
Get the field value.
|
java.lang.String |
getValueAsString()
Returns a string representation of the "V" entry, or an empty string.
|
java.util.List<PDAnnotationWidget> |
getWidgets()
Returns the widget annotations associated with this field.
|
(package private) void |
importFDF(FDFField fdfField)
This will import a fdf field from a fdf document.
|
void |
setChildren(java.util.List<PDField> children)
Sets the child fields.
|
void |
setDefaultValue(COSBase value)
Sets the default of this field.
|
void |
setValue(COSBase object)
Sets the value of this field.
|
void |
setValue(java.lang.String value)
Sets the plain text value of this field.
|
findKid, fromDictionary, getAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, isNoExport, isReadOnly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadOnly, setRequired, toString
public PDNonTerminalField(PDAcroForm acroForm)
acroForm
- The form that this field is part of.PDNonTerminalField(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
acroForm
- The form that this field is part of.field
- the PDF object to represent as a field.parent
- the parent node of the node to be createdpublic int getFieldFlags()
PDField
getFieldFlags
in class PDField
void importFDF(FDFField fdfField) throws java.io.IOException
PDField
FDFField exportFDF() throws java.io.IOException
PDField
public java.util.List<PDField> getChildren()
setChildren()
with the modified list.public void setChildren(java.util.List<PDField> children)
children
- The list of child fields.public java.lang.String getFieldType()
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
getFieldType
in class PDField
public COSBase getValue()
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
public java.lang.String getValueAsString()
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
getValueAsString
in class PDField
public void setValue(COSBase object) throws java.io.IOException
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
object
- java.io.IOException
public void setValue(java.lang.String value) throws java.io.IOException
public COSBase getDefaultValue()
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
public void setDefaultValue(COSBase value)
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
value
- public java.util.List<PDAnnotationWidget> getWidgets()
PDField
PDNonTerminalField
the list will be empty as non terminal fields
have no visual representation in the form.getWidgets
in class PDField
PDAnnotationWidget
annotations. Be aware that this list is
not backed by the actual widget collection of the field, so adding or deleting has no
effect on the PDF document. For PDTerminalField
you'd have to call
setWidgets()
with the modified list.