com.foxit.sdk.pdf.interform.Control Class Reference
Inheritance diagram for com.foxit.sdk.pdf.interform.Control:
com.foxit.sdk.common.Base

Public Member Functions

 Control (Control other)
 Constructor, with another Control object. More...
 
String getExportValue () throws com.foxit.sdk.PDFException
 Get export mapping name when related form field is check box or radio button. More...
 
Field getField () throws com.foxit.sdk.PDFException
 Get the related form field. More...
 
int getIndex () throws com.foxit.sdk.PDFException
 Get the index of current form control among all the controls of related form field. More...
 
Widget getWidget () throws com.foxit.sdk.PDFException
 Get the related widget annotation. More...
 
boolean isChecked () throws com.foxit.sdk.PDFException
 Check if the current form control is checked when related form field is check box or radio button. More...
 
boolean isDefaultChecked () throws com.foxit.sdk.PDFException
 Check if the current form control is checked by default when related form field is check box or radio button. More...
 
boolean isEmpty ()
 Check whether current object is empty or not. More...
 
void setChecked (boolean checked) throws com.foxit.sdk.PDFException
 Set the check state of current form control when related form field is check box or radio button. More...
 
void setDefaultChecked (boolean checked) throws com.foxit.sdk.PDFException
 Set the default check state of current form control when related form field is check box or radio button. More...
 
void setExportValue (String value) throws com.foxit.sdk.PDFException
 Set export mapping name when related form field is check box or radio button. More...
 

Detailed Description

Foxit PDF SDK defines "form control" to associate form field with its related widget annotations. A form field may have one or more form controls, and each form control is associated with a widget annotation. A form control object can be retrieved by following functions:


from a form, please use function Form::getControl.
from a form field, please use functions Field::getControl.
Form control also offers functions to get related form field object and widget annotation object.
Function Form::addControl can be used to add a new form control to a form field, and function Form::removeControl can be used to remove a form control.

See also
Form
Field

Constructor & Destructor Documentation

◆ Control()

com.foxit.sdk.pdf.interform.Control.Control ( Control  other)

Constructor, with another Control object.

Parameters
otherAnother Control object.

Member Function Documentation

◆ getExportValue()

String com.foxit.sdk.pdf.interform.Control.getExportValue ( ) throws com.foxit.sdk.PDFException

Get export mapping name when related form field is check box or radio button.

Applicable for check box and radio button as related form field. If related form field is other field type, this function will return an empty string.

Returns
The export mapping name.

◆ getField()

Field com.foxit.sdk.pdf.interform.Control.getField ( ) throws com.foxit.sdk.PDFException

Get the related form field.

Returns
The related Field object.

◆ getIndex()

int com.foxit.sdk.pdf.interform.Control.getIndex ( ) throws com.foxit.sdk.PDFException

Get the index of current form control among all the controls of related form field.

Returns
The index of the form control.

◆ getWidget()

Widget com.foxit.sdk.pdf.interform.Control.getWidget ( ) throws com.foxit.sdk.PDFException

Get the related widget annotation.

Returns
The related widget annotation.

◆ isChecked()

boolean com.foxit.sdk.pdf.interform.Control.isChecked ( ) throws com.foxit.sdk.PDFException

Check if the current form control is checked when related form field is check box or radio button.

Applicable for check box and radio button as related form field. If related form field is other field type, this function will return false.

Returns
true means checked, and false means not checked.

◆ isDefaultChecked()

boolean com.foxit.sdk.pdf.interform.Control.isDefaultChecked ( ) throws com.foxit.sdk.PDFException

Check if the current form control is checked by default when related form field is check box or radio button.

Applicable for check box and radio button as related form field. If related form field is other field type, this function will return false.

Returns
true means checked by default, and false means not checked by default.

◆ isEmpty()

boolean com.foxit.sdk.pdf.interform.Control.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ setChecked()

void com.foxit.sdk.pdf.interform.Control.setChecked ( boolean  checked) throws com.foxit.sdk.PDFException

Set the check state of current form control when related form field is check box or radio button.

Applicable for check box and radio button as related form field. If related form field is other field type, this function will do nothing.

Parameters
checkedtrue means checked, and false means not checked.
Returns
None.

◆ setDefaultChecked()

void com.foxit.sdk.pdf.interform.Control.setDefaultChecked ( boolean  checked) throws com.foxit.sdk.PDFException

Set the default check state of current form control when related form field is check box or radio button.

Applicable for check box and radio button as related form field. If related form field is other field type, this function will do nothing.

Parameters
checkedtrue means checked by default, and false means not checked by default.
Returns
None.

◆ setExportValue()

void com.foxit.sdk.pdf.interform.Control.setExportValue ( String  value) throws com.foxit.sdk.PDFException

Set export mapping name when related form field is check box or radio button.

Applicable for check box and radio button as related form field. If related form field is other field type, this function will do nothing.

Parameters
valueThe new export mapping name. It should not be an empty string.
Returns
None.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.