Class Field
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.forms.FieldNode
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.forms.Field
-
- Direct Known Subclasses:
CheckBox
,ChoiceField
,PushButton
,RadioButtonGroup
,TextField
public abstract class Field extends FieldNode
A form field
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Widget
addNewWidget(Rectangle boundingBox)
Create a new widget and add to the form fieldboolean
getDoNotExport()
Tells whether this field is exported (Getter)boolean
getReadOnly()
Flags this field as read-only (Getter)boolean
getRequired()
Flags this field as mandatory (Getter)WidgetList
getWidgets()
This form field's widget annotations (Getter)void
setDoNotExport(boolean value)
Tells whether this field is exported (Setter)void
setReadOnly(boolean value)
Flags this field as read-only (Setter)void
setRequired(boolean value)
Flags this field as mandatory (Setter)-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.forms.FieldNode
copy, getDisplayName, getExportName, setDisplayName, setExportName
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
addNewWidget
public Widget addNewWidget(Rectangle boundingBox)
Create a new widget and add to the form field
This method creates a widget for the form field. The widget is automatically added to the field's widgets, but not to any page. This method does not work for radio button form fields; UseRadioButton.addNewWidget(com.pdf_tools.fourheights.pdftoolbox.geometry.real.Rectangle)
.- Parameters:
boundingBox
- The widget's target rectangle on the page- Returns:
- the newly created form field widget
- Throws:
java.lang.IllegalStateException
- if the document has already been closedjava.lang.UnsupportedOperationException
- if the document is read-onlyjava.lang.UnsupportedOperationException
- if the form field is of typeRadioButtonGroup
java.lang.IllegalArgumentException
- ifboundingBox
isnull
-
getWidgets
public WidgetList getWidgets()
This form field's widget annotations (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
getReadOnly
public boolean getReadOnly()
Flags this field as read-only (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setReadOnly
public void setReadOnly(boolean value)
Flags this field as read-only (Setter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closedjava.lang.UnsupportedOperationException
- if the document is read-only
-
getRequired
public boolean getRequired()
Flags this field as mandatory (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setRequired
public void setRequired(boolean value)
Flags this field as mandatory (Setter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closedjava.lang.UnsupportedOperationException
- if the document is read-only
-
getDoNotExport
public boolean getDoNotExport()
Tells whether this field is exported (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setDoNotExport
public void setDoNotExport(boolean value)
Tells whether this field is exported (Setter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closedjava.lang.UnsupportedOperationException
- if the document is read-only
-
-