public class CheckBox extends Field
Modifier and Type | Method and Description |
---|---|
static CheckBox |
create(Document targetDocument)
Create a check box form field
|
static CheckBox |
createDynamicObject(long handle) |
boolean |
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)
|
addNewWidget, getDoNotExport, getReadOnly, getRequired, getWidgets, setDoNotExport, setReadOnly, setRequired
copy, getDisplayName, getExportName, setDisplayName, setExportName
equals, hashCode
public static CheckBox createDynamicObject(long handle)
public static CheckBox create(Document targetDocument)
targetDocument
- the output document with which the returned object is associatedjava.lang.IllegalArgumentException
- if the targetDocument
argument is null
java.lang.IllegalArgumentException
- if the targetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if the targetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- the target document contains form fields that have been implicitly copied by a call to
pdftoolbox.pdf.Page.copy
with an argument options
in which
pdftoolbox.pdf.PageCopyOptions.setFormFields
was set to FormFieldCopyStrategy.COPY
java.lang.IllegalArgumentException
- the target document contains unsigned signatures that have been implicitly copied by a call to
pdftoolbox.pdf.Page.copy
with an argument options
in which
pdftoolbox.pdf.PageCopyOptions.setUnsignedSignatures
was set to pdftoolbox.pdf.CopyStrategy.COPY
.public java.lang.String getCheckedExportName()
java.lang.IllegalStateException
- if the object has already been closedpublic boolean getChecked()
java.lang.IllegalStateException
- if the object has already been closedpublic void setChecked(boolean value)
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