1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class frame extends MultiPartElement implements Printable 71 { 72 public final static String yes = "yes"; 73 public final static String no = "no"; 74 public final static String auto = "auto"; 75 76 79 { 80 setElementType("frame"); 81 setCase(LOWERCASE); 82 setAttributeQuote(true); 83 } 84 87 public frame() 88 { 89 } 90 91 95 public frame(Element element) 96 { 97 addElement(element); 98 } 99 100 104 public frame(String element) 105 { 106 addElement(element); 107 } 108 109 114 public frame(Element element, String name) 115 { 116 addElement(element); 117 setName(name); 118 } 119 120 125 public frame(String element, String name) 126 { 127 addElement(element); 128 setName(name); 129 } 130 131 137 public frame(Element element, String name, String src) 138 { 139 addElement(element); 140 setName(name); 141 setSrc(src); 142 } 143 144 150 public frame(String element, String name, String src) 151 { 152 addElement(element); 153 setName(name); 154 setSrc(src); 155 } 156 157 161 public frame setLongDesc(String longdesc) 162 { 163 addAttribute("longdesc",longdesc); 164 return this; 165 } 166 167 171 public frame setName(String name) 172 { 173 addAttribute("name",name); 174 return this; 175 } 176 177 181 public frame setSrc(String src) 182 { 183 addAttribute("src",src); 184 return this; 185 } 186 187 191 public frame setFrameBorder(boolean frameborder) 192 { 193 if (frameborder) 194 addAttribute("frameborder",Integer.toString(1)); 195 else 196 addAttribute("frameborder",Integer.toString(0)); 197 return this; 198 } 199 200 204 public frame setMarginWidth(int marginwidth) 205 { 206 setMarginWidth(Integer.toString(marginwidth)); 207 return this; 208 } 209 210 214 public frame setMarginWidth(String marginwidth) 215 { 216 addAttribute("marginwidth",marginwidth); 217 return this; 218 } 219 220 224 public frame setMarginHeight(int marginheight) 225 { 226 setMarginHeight(Integer.toString(marginheight)); 227 return this; 228 } 229 230 234 public frame setMarginHeight(String marginheight) 235 { 236 addAttribute("marginheight",marginheight); 237 return this; 238 } 239 240 244 public frame setScrolling(String scrolling) 245 { 246 addAttribute("scrolling",scrolling); 247 return this; 248 } 249 250 254 public frame setNoResize(boolean noresize) 255 { 256 if ( noresize == true ) 257 addAttribute("noresize", "noresize"); 258 else 259 removeAttribute("noresize"); 260 261 return(this); 262 } 263 264 268 public Element setLang(String lang) 269 { 270 addAttribute("lang",lang); 271 addAttribute("xml:lang",lang); 272 return this; 273 } 274 275 280 public frame addElement(String hashcode,Element element) 281 { 282 addElementToRegistry(hashcode,element); 283 return(this); 284 } 285 286 291 public frame addElement(String hashcode,String element) 292 { 293 addElementToRegistry(hashcode,element); 294 return(this); 295 } 296 297 301 public frame addElement(Element element) 302 { 303 addElementToRegistry(element); 304 return(this); 305 } 306 307 311 public frame addElement(String element) 312 { 313 addElementToRegistry(element); 314 return(this); 315 } 316 317 321 public frame removeElement(String hashcode) 322 { 323 removeElementFromRegistry(hashcode); 324 return(this); 325 } 326 } 327 | Popular Tags |