Class CheckBox
- 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
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.forms.CheckBox
-
public class CheckBox extends Field
A check box field
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CheckBox
create(Document targetDocument)
Create a check box form fieldboolean
getChecked()
The state of the check box (Getter)java.lang.String
getCheckedExportName()
The name of the checked ('on') state used when exporting (Getter)void
setChecked(boolean value)
The state of the check box (Setter)-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.forms.Field
addNewWidget, getDoNotExport, getReadOnly, getRequired, getWidgets, setDoNotExport, setReadOnly, setRequired
-
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
-
create
public static CheckBox create(Document targetDocument)
Create a check box form field
The returned form field object is not yet used, but it is associated with the given target document.- Parameters:
targetDocument
- the output document with which the returned object is associated- Returns:
- the newly created check box field
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- the target document contains form fields that have been implicitly copied by a call topdftoolbox.pdf.Page.copy
with an argumentoptions
in whichpdftoolbox.pdf.PageCopyOptions.setFormFields
was set toFormFieldCopyStrategy.COPY
java.lang.IllegalArgumentException
- the target document contains unsigned signatures that have been implicitly copied by a call topdftoolbox.pdf.Page.copy
with an argumentoptions
in whichpdftoolbox.pdf.PageCopyOptions.setUnsignedSignatures
was set topdftoolbox.pdf.CopyStrategy.COPY
.java.lang.IllegalArgumentException
- iftargetDocument
isnull
-
getCheckedExportName
public java.lang.String getCheckedExportName()
The name of the checked ('on') state used when exporting (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
getChecked
public boolean getChecked()
The state of the check box (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
setChecked
public void setChecked(boolean value)
The state of the check box (Setter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closedjava.lang.UnsupportedOperationException
- if the document is read-onlyjava.lang.IllegalStateException
- if the form field is marked as read-only
-
-