|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.justformspdf.lib.PDFObjectImp
|
+--com.justformspdf.lib.PDFObjectGeneric
|
+--com.justformspdf.pdf.FormElement
|
+--com.justformspdf.pdf.FormCheckbox
This class represents the Check Box field of PDF Forms.
Check boxes allow a user to select one or more items from a list. In the same way as the HTML Check Box works, a PDF check box can be either "checked" or "un-checked".
Here is an example:
FileInputStream fis = new FileInputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2.pdf");
PDF pdf = new PDF(new PDFReader(fis));
Form form = pdf.getForm();
FormCheckbox addressType = (FormCheckbox) form.getElement("AddressTypePerm");
addressType.check(true);
| Field Summary |
| Fields inherited from class com.justformspdf.pdf.FormElement |
JUSTIFICATION_CENTER, JUSTIFICATION_LEFT, JUSTIFICATION_RIGHT |
| Constructor Summary | |
FormCheckbox(java.lang.String name)
|
|
| Method Summary | |
void |
check(boolean flag)
Check or uncheck the checkbox. |
void |
setValue(java.lang.String value)
Set value of this form element. |
| Methods inherited from class com.justformspdf.pdf.FormElement |
getName,getType,getRect,getValue,setReadOnly,isReadOnly
|
| Constructor Detail |
public FormCheckbox(java.lang.String name)
| Method Detail |
public void setValue(java.lang.String value)
throws java.lang.Exception
This method is applibale to all the form elements FormText, FormCheckBox, FormComboBox, FormButton and FormRadioGroup.
Here is an example:
FormCheckbox addressType = (FormCheckbox) form.getElement("AddressTypePerm");
addressType.setValue("Yes");
//addressType.setValue("Off");
setValue in class FormElementvalue - form element value ("Yes" or "Off")
java.lang.Exceptioncheck(boolean)
public void check(boolean flag)
throws java.lang.Exception
Here is an example:
FormCheckbox addressType = (FormCheckbox) form.getElement("AddressTypePerm");
addressType.check(true);
flag - check/uncheck flag true = check, false = uncheck
java.lang.ExceptionsetValue(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||