|
||||||||||
| 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
The FormElement class is the class from which all classes representing various form elements are derived. User accessing a form element (from the Form object) of a specific type must type cast it to the matching class.
Here is an example showing a Text Box form element is being accessed and type casted to FormText.
FileInputStream fis = new FileInputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2.pdf");
PDF pdf = new PDF(new PDFReader(fis));
Form form = pdf.getForm();
FormText text = (FormText) form.getElement("Name");
text.setValue("John K. Baker");
| Field Summary | |
static int |
JUSTIFICATION_CENTER
|
static int |
JUSTIFICATION_LEFT
|
static int |
JUSTIFICATION_RIGHT
|
| Constructor Summary | |
FormElement(java.lang.String name)
|
|
| Method Summary | |
java.lang.String |
getName()
Get name of this form element. |
java.lang.String |
getType() Get form element type |
java.lang.String |
getRect() Get rectangular coordinates |
java.lang.String |
getValue()
Get value (text) of this form element. |
void |
setValue(java.lang.String value)
Set value of a form element. |
void |
setReadOnly(boolean)
Set the "ReadOnly" flag of a form element. |
boolean |
isReadOnly()
Get the value of "ReadOnly" flag. |
| Field Detail |
public static int JUSTIFICATION_LEFT
public static int JUSTIFICATION_CENTER
public static int JUSTIFICATION_RIGHT
| Constructor Detail |
public FormElement(java.lang.String name)
| Method Detail |
public java.lang.String getName()
public java.lang.String getType()
public java.lang.String getRect()
public java.lang.String getValue()
public void setValue(java.lang.String value)
throws java.lang.Exception
value - form element value
java.lang.Exception
public void setReadOnly(boolean flag)
falg - "ReadOnly" flag. true = ReadOnly, false
= Read/Write
public boolean isReadOnly()
falg - "ReadOnly" flag of a form element. true
= ReadOnly, false = Read/Write
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||