Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.interactive.form
Class PDCheckbox

    java.lang.Object
      org.pdfbox.pdmodel.interactive.form.PDField
          org.pdfbox.pdmodel.interactive.form.PDChoiceButton
              org.pdfbox.pdmodel.interactive.form.PDCheckbox

All Implemented Interfaces:
  COSObjectable

public class PDCheckbox
extends PDChoiceButton

A class for handling the PDF field as a checkbox.

Version:
  $Revision: 1.10 $
Author:
  sug

Field Summary

Fields inherited from class org.pdfbox.pdmodel.interactive.form.PDField
`FLAG_NO_EXPORT, FLAG_READ_ONLY, FLAG_REQUIRED`

Constructor Summary
`PDCheckbox(PDAcroForm theAcroForm, COSDictionary field)`

Method Summary
`void` | `check()` Checks the radiobutton.
`String` | `getOffValue()` This will get the value of the radio button.
`String` | `getOnValue()` This will get the value of the radio button.
`String` | `getValue()` getValue gets the fields value to as a string.
`boolean` | `isChecked()` This will tell if this radio button is currently checked or not.
`void` | `setValue(String newValue)` setValue sets the fields value to a given string.
`void` | `unCheck()` Unchecks the radiobutton.

Methods inherited from class org.pdfbox.pdmodel.interactive.form.PDChoiceButton
`getOptions, setOptions`

Methods inherited from class org.pdfbox.pdmodel.interactive.form.PDField
`findFieldType, getAcroForm, getActions, getCOSObject, getDictionary, getFfFlag, getFieldFlags, getFieldType, getFullyQualifiedName, getKids, getParent, getPartialName, getWidget, importFDF, isNoExport, isReadonly, isRequired, setAcroForm, setActions, setFfFlag, setFieldFlags, setKids, setNoExport, setParent, setPartialName, setReadonly, setRequired, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PDCheckbox

    public PDCheckbox(PDAcroForm theAcroForm,
                      COSDictionary field)

Parameters:
  `theAcroForm` - The acroForm for this field.
  `field` - The checkbox field dictionary
See Also:
  `PDField.PDField(PDAcroForm,COSDictionary)`

Method Detail

### isChecked

    public boolean isChecked()

  This will tell if this radio button is currently checked or not.

  Returns:
    true If the radio button is checked.

### check

    public void check()

  Checks the radiobutton.

### unCheck

    public void unCheck()

  Unchecks the radiobutton.

### setValue

    public void setValue(String newValue)

  Description copied from class: `PDField`
  setValue sets the fields value to a given string.

  Specified by:
    `setValue` in class `PDField`
  Parameters:
    `newValue` - the string value
  See Also:
    `PDField.setValue(java.lang.String)`

### getOffValue

    public String getOffValue()

  This will get the value of the radio button.

  Returns:
    The value of the radio button.

### getOnValue

    public String getOnValue()

  This will get the value of the radio button.

  Returns:
    The value of the radio button.

### getValue

    public String getValue()
                    throws IOException

  getValue gets the fields value to as a string.

  Specified by:
    `getValue` in class `PDField`
  Returns:
    The string value of this field.
  Throws:
    `IOException` - If there is an error getting the value.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD