public class

CheckBoxWidget

extends Widget
java.lang.Object
   ↳ com.pdftron.pdf.Annot
     ↳ com.pdftron.pdf.annots.Widget
       ↳ com.pdftron.pdf.annots.CheckBoxWidget

Class Overview

An object representing a check box used in a PDF Form.

Summary

[Expand]
Inherited Constants
From class com.pdftron.pdf.annots.Widget
From class com.pdftron.pdf.Annot
Public Constructors
CheckBoxWidget(Obj d)
Creates a Check Box Widget annotation and initialize it using given Cos/SDF object.
CheckBoxWidget()
Create an empty Check Box Widget annotation.
CheckBoxWidget(Annot annot)
Creates a Check Box Widget annotation and initialize it using given annotation object.
Public Methods
static CheckBoxWidget create(Doc doc, Rect pos, String field_name)
Creates a new Check Box Widget annotation, in the specified document.
static CheckBoxWidget create(Doc doc, Rect pos, Field field)
Creates a new Check Box Widget annotation, in the specified document.
static CheckBoxWidget create(Doc doc, Rect pos)
Creates a new Check Box Widget annotation, in the specified document.
boolean isChecked()
Returns whether the checkbox is checked.
void setChecked(boolean value)
Check or uncheck the Check Box Widget
[Expand]
Inherited Methods
From class com.pdftron.pdf.annots.Widget
From class com.pdftron.pdf.Annot
From class java.lang.Object

Public Constructors

public CheckBoxWidget (Obj d)

Creates a Check Box Widget annotation and initialize it using given Cos/SDF object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
d the object to use to initialize the Check Box Widget

public CheckBoxWidget ()

Create an empty Check Box Widget annotation.

public CheckBoxWidget (Annot annot)

Creates a Check Box Widget annotation and initialize it using given annotation object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
annot The annotation to use.

Public Methods

public static CheckBoxWidget create (Doc doc, Rect pos, String field_name)

Creates a new Check Box Widget annotation, in the specified document.

Parameters
doc The document to which the annotation is to be added.
pos A rectangle specifying the annotation's bounds, specified in user space coordinates.
field_name The name of the field for which to create a CheckBox widget.
Returns
  • A newly created blank Check Box Widget annotation.

public static CheckBoxWidget create (Doc doc, Rect pos, Field field)

Creates a new Check Box Widget annotation, in the specified document.

Parameters
doc The document to which the annotation is to be added.
pos A rectangle specifying the annotation's bounds, specified in user space coordinates.
field the field for which to create a CheckBox widget
Returns
  • A newly created blank Check Box Widget annotation.

public static CheckBoxWidget create (Doc doc, Rect pos)

Creates a new Check Box Widget annotation, in the specified document.

Parameters
doc The document to which the annotation is to be added.
pos A rectangle specifying the annotation's bounds, specified in user space coordinates.
Returns
  • A newly created blank Check Box Widget annotation.

public boolean isChecked ()

Returns whether the checkbox is checked.

Returns
  • A boolean value indicating whether the checkbox is checked.

public void setChecked (boolean value)

Check or uncheck the Check Box Widget

Parameters
value If true, the annotation should be checked. Otherwise it should be unchecked.