|
||||||||||
| 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.FormChoice
|
+--com.justformspdf.pdf.FormComboBox
This class represents the Combo Box field of PDF Forms.
Combo boxes provide a list of items for selection. No matter how large a combo box is, it will only show the first item in the list, providing a scroll bar to access the other items.
Here is an example:
FileInputStream fis = new FileInputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2.pdf");
PDF pdf = new PDF(new PDFReader(fis));
Form form = pdf.getForm();
FormComboBox suffix = (FormComboBox) form.getElement("Suffix");
suffix.setValueByIndex(5);
| Field Summary |
| Fields inherited from class com.justformspdf.pdf.FormElement |
JUSTIFICATION_CENTER, JUSTIFICATION_LEFT, JUSTIFICATION_RIGHT |
| Constructor Summary | |
FormComboBox(java.lang.String name)
|
|
| Method Summary | |
void |
setValue(java.lang.String value)
Set value of this form element. |
void |
setValueByIndex(int index)
Select a particular value of combo box by the index of (item, value) pairs in the combo box. |
| Methods inherited from class com.justformspdf.pdf.FormElement |
getName,getType,getRect,getValue,setReadOnly,isReadOnly
|
| Constructor Detail |
public FormComboBox(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:
FormComboBox suffix = (FormComboBox) form.getElement("Suffix");
suffix.setValue("5");
setValue in class FormElementvalue - form element value
java.lang.ExceptionsetValueByIndex(int)
public void setValueByIndex(int index)
throws java.lang.Exception
Here is an example:
FormComboBox suffix = (FormComboBox) form.getElement("Suffix");
suffix.setValueByIndex(5);
index - the index of selected combo box value
java.lang.ExceptionsetValue(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||