1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class IFrame extends MultiPartElement implements Printable 70 { 71 public final static String YES = "YES"; 72 public final static String NO = "NO"; 73 public final static String AUTO = "AUTO"; 74 public final static String yes = "yes"; 75 public final static String no = "no"; 76 public final static String auto = "auto"; 77 78 81 { 82 setElementType("iframe"); 83 } 84 87 public IFrame() 88 { 89 } 90 91 95 public IFrame(Element element) 96 { 97 addElement(element); 98 } 99 100 104 public IFrame(String element) 105 { 106 addElement(element); 107 } 108 109 114 public IFrame(Element element, String name) 115 { 116 addElement(element); 117 setName(name); 118 } 119 120 125 public IFrame(String element, String name) 126 { 127 addElement(element); 128 setName(name); 129 } 130 131 137 public IFrame(Element element, String name, String src) 138 { 139 addElement(element); 140 setName(name); 141 setSrc(src); 142 } 143 144 150 public IFrame(String element, String name, String src) 151 { 152 addElement(element); 153 setName(name); 154 setSrc(src); 155 } 156 157 161 public IFrame setLongDesc(String longdesc) 162 { 163 addAttribute("longdesc",longdesc); 164 return this; 165 } 166 167 171 public IFrame setName(String name) 172 { 173 addAttribute("name",name); 174 return this; 175 } 176 177 181 public IFrame setSrc(String src) 182 { 183 addAttribute("src",src); 184 return this; 185 } 186 187 191 public IFrame 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 IFrame setMarginWidth(int marginwidth) 205 { 206 setMarginWidth(Integer.toString(marginwidth)); 207 return this; 208 } 209 210 214 public IFrame setMarginWidth(String marginwidth) 215 { 216 addAttribute("marginwidth",marginwidth); 217 return this; 218 } 219 220 221 225 public IFrame setHeight(String height) 226 { 227 addAttribute("height",height); 228 return this; 229 } 230 231 235 public IFrame setHeight(int height) 236 { 237 addAttribute("height",Integer.toString(height)); 238 return this; 239 } 240 241 245 public IFrame setWidth(String width) 246 { 247 addAttribute("width",width); 248 return this; 249 } 250 251 255 public IFrame setWidth(int width) 256 { 257 addAttribute("width",Integer.toString(width)); 258 return this; 259 } 260 261 265 public IFrame setMarginHeight(int marginheight) 266 { 267 setMarginHeight(Integer.toString(marginheight)); 268 return this; 269 } 270 271 275 public IFrame setMarginHeight(String marginheight) 276 { 277 addAttribute("marginheight",marginheight); 278 return this; 279 } 280 281 285 public IFrame setScrolling(String scrolling) 286 { 287 addAttribute("scrolling",scrolling); 288 return this; 289 } 290 291 297 public IFrame setAlign(String align) 298 { 299 addAttribute("align",align); 300 return(this); 301 } 302 303 308 public IFrame addElement(String hashcode,Element element) 309 { 310 addElementToRegistry(hashcode,element); 311 return(this); 312 } 313 314 319 public IFrame addElement(String hashcode,String element) 320 { 321 addElementToRegistry(hashcode,element); 322 return(this); 323 } 324 325 329 public IFrame addElement(Element element) 330 { 331 addElementToRegistry(element); 332 return(this); 333 } 334 335 339 public IFrame addElement(String element) 340 { 341 addElementToRegistry(element); 342 return(this); 343 } 344 348 public IFrame removeElement(String hashcode) 349 { 350 removeElementFromRegistry(hashcode); 351 return(this); 352 } 353 } 354 | Popular Tags |