|
||||||||||
| 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.FormRadioGroup
This class represents the Radio Group field of PDF Forms.
Radio buttons, like check boxes, allow a user to select one or more items from a list. The main difference between radio buttons and check boxes, as provided by Adobe Acrobat, is the appearance and the fact that at least one annotation for each Radio Button must be set.
Here is an example:
FileInputStream fis = new FileInputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2.pdf");
PDF pdf = new PDF(new PDFReader(fis));
Form form = pdf.getForm();
FormRadioGroup ethnic = (FormRadioGroup) form.getElement("ethnic");
ethnic.setValue("ETH02");
//ethnic.setValueByIndex(2);
| Field Summary |
| Fields inherited from class com.justformspdf.pdf.FormElement |
JUSTIFICATION_CENTER, JUSTIFICATION_LEFT, JUSTIFICATION_RIGHT |
| Constructor Summary | |
FormRadioGroup(java.lang.String name)
|
|
| Method Summary | |
void |
setValue(java.lang.String value)
Select a radio button by matching the method argument value to Export Value of a button. |
void |
setValueByIndex(int index)
Select a radio button by its index in the radio group/family. |
| Methods inherited from class com.justformspdf.pdf.FormElement |
getName,getType,getRect,getValue,setReadOnly,isReadOnly
|
| Constructor Detail |
public FormRadioGroup(java.lang.String name)
| Method Detail |
public void setValueByIndex(int index)
throws java.lang.Exception
Here is an example:
FormRadioGroup ethnic = (FormRadioGroup) form.getElement("ethnic");
ethnic.setValue("ETH02");
//ethnic.setValueByIndex(2);
index - the index of selected radio button
java.lang.ExceptionsetValue(java.lang.String)
public void setValue(java.lang.String value)
throws java.lang.Exception
Here is an example:
FormRadioGroup ethnic = (FormRadioGroup) form.getElement("ethnic");
ethnic.setValue("ETH02");
//ethnic.setValueByIndex(2);
setValue in class FormElementvalue - form element value
java.lang.ExceptionsetValueByIndex(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||