java.lang.Object
org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
org.sejda.sambox.pdmodel.interactive.form.PDField
org.sejda.sambox.pdmodel.interactive.form.PDTerminalField
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
PDButton,PDSignatureField,PDVariableText
A field in an interactive form. Fields may be one of four types: button, text, choice, or signature.
- Author:
- sug
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWidgetIfMissing(PDAnnotationWidget widget) Adds the given widget as child of this fields, only if not already presentfinal voidApplies a value change to the field.intThis will get the flags for this field.Get the FT entry of the field.Returns the widget annotations associated with this field.booleanbooleanremoveWidget(PDAnnotationWidget widget) voidsetActions(PDFormFieldAdditionalActions actions) Set the actions of the field.voidsetWidgets(List<PDAnnotationWidget> children) Sets the field's widget annotations.Methods inherited from class org.sejda.sambox.pdmodel.interactive.form.PDField
getAcroForm, getActions, getAlternateFieldName, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, getValueAsString, isNoExport, isReadonly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadonly, setRequired, setValue, toStringMethods inherited from class org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Constructor Details
-
PDTerminalField
Constructor.- Parameters:
acroForm- The form that this field is part of.
-
-
Method Details
-
setActions
Set the actions of the field.- Parameters:
actions- The field actions.
-
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.
-
getFieldType
Description copied from class:PDFieldGet 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.- Specified by:
getFieldTypein classPDField- Returns:
- The Field type.
-
getWidgets
Returns the widget annotations associated with this field.- Specified by:
getWidgetsin classPDField- Returns:
- The list of widget annotations.
-
removeWidget
-
addWidgetIfMissing
Adds the given widget as child of this fields, only if not already present- Parameters:
widget-
-
setWidgets
Sets the field's widget annotations.- Parameters:
children- The list of widget annotations.
-
applyChange
Applies a value change to the field. Generates appearances if required and raises events.- Throws:
IOException- if the appearance couldn't be generated
-
isTerminal
public boolean isTerminal()- Specified by:
isTerminalin classPDField
-