Class PDNonTerminalField
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.interactive.form.PDField
-
- com.tom_roush.pdfbox.pdmodel.interactive.form.PDNonTerminalField
-
- All Implemented Interfaces:
COSObjectable
public class PDNonTerminalField extends PDField
A non terminal field in an interactive form. A non terminal field is a node in the fields tree node whose descendants are fields. The attributes such as FT (field type) or V (field value) do not logically belong to the non terminal field but are inheritable attributes for descendant terminal fields.
-
-
Field Summary
-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.interactive.form.PDField
acroForm, dictionary, parent
-
-
Constructor Summary
Constructors Constructor Description PDNonTerminalField(PDAcroForm acroForm)Constructor.PDNonTerminalField(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PDField>getChildren()Returns this field's children.COSBasegetDefaultValue()Returns the default value of this field.intgetFieldFlags()This will get the flags for this field.StringgetFieldType()Get the FT entry of the field.COSBasegetValue()StringgetValueAsString()Returns a string representation of the "V" entry, or an empty string.voidsetChildren(List<PDField> children)Sets the child fields.voidsetDefaultValue(COSBase value)Sets the default of this field.voidsetValue(COSBase object)Sets the value of this field.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.interactive.form.PDField
getAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, isNoExport, isReadOnly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadOnly, setRequired, toString
-
-
-
-
Constructor Detail
-
PDNonTerminalField
public PDNonTerminalField(PDAcroForm acroForm)
Constructor.- Parameters:
acroForm- The form that this field is part of.
-
PDNonTerminalField
public PDNonTerminalField(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
Constructor.- Parameters:
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 created
-
-
Method Detail
-
getFieldFlags
public int getFieldFlags()
Description copied from class:PDFieldThis will get the flags for this field.- Specified by:
getFieldFlagsin classPDField- Returns:
- flags The set of flags.
-
getChildren
public List<PDField> getChildren()
Returns this field's children. These may be either terminal or non-terminal fields.- Returns:
- he list of child fields.
-
setChildren
public void setChildren(List<PDField> children)
Sets the child fields.- Parameters:
children- The list of child fields.
-
getFieldType
public String getFieldType()
Get the FT entry of the field. This is a read only field and is set depending on the actual type. The field type is an inheritable attribute.Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
- Specified by:
getFieldTypein classPDField- Returns:
- The Field type.
-
getValue
public COSBase getValue()
Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
-
getValueAsString
public String getValueAsString()
Returns a string representation of the "V" entry, or an empty string.Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
- Specified by:
getValueAsStringin classPDField- Returns:
- A non-null string.
-
setValue
public void setValue(COSBase object) throws IOException
Sets the value of this field. This may be of any kind which is valid for this field's children.Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
- Throws:
IOException
-
getDefaultValue
public COSBase getDefaultValue()
Returns the default value of this field. This may be of any kind which is valid for this field's children.Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
-
setDefaultValue
public void setDefaultValue(COSBase value)
Sets the default of this field. This may be of any kind which is valid for this field's children.Note: while non-terminal fields do inherit field values, this method returns the local value, without inheritance.
-
-