1 3 package org.faceless.pdf; 4 5 import java.util.*; 6 import java.awt.Color ; 7 8 14 public abstract class FormElement extends PeeredObject 15 { 16 22 public static final int STYLE_CHECK=0x2714; 23 24 30 public static final int STYLE_CIRCLE=0x25CF; 31 32 37 public static final int STYLE_CROSS=0x2718; 38 39 44 public static final int STYLE_SQUARE=0x25A0; 45 46 51 public static final int STYLE_DIAMOND=0x25C6; 52 53 58 public static final int STYLE_STAR=0x2605; 59 60 61 final org.faceless.pdf2.FormElement element; 62 63 Object getPeer() 64 { 65 return element; 66 } 67 68 FormElement(org.faceless.pdf2.FormElement element) 69 { 70 this.element=element; 71 } 72 73 81 public PDFAnnotation[] getAnnotations() 82 { 83 List l = element.getAnnotations(); 84 PDFAnnotation[] z = new PDFAnnotation[l.size()]; 85 for (int i=0;i<z.length;i++) { 86 z[i]=(PDFAnnotation)PeeredObject.getPeer(l.get(i)); 87 } 88 return z; 89 } 90 91 96 public void setReadOnly(boolean readonly) 97 { 98 element.setReadOnly(readonly); 99 } 100 101 106 public boolean isReadOnly() 107 { 108 return element.isReadOnly(); 109 } 110 111 117 public void setRequired(boolean required) 118 { 119 element.setRequired(required); 120 } 121 122 128 public boolean isRequired() 129 { 130 return element.isRequired(); 131 } 132 133 139 public void setSubmitted(boolean submit) 140 { 141 element.setSubmitted(submit); 142 } 143 144 149 public boolean isSubmitted() 150 { 151 return element.isSubmitted(); 152 } 153 } 154 | Popular Tags |