1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 import java.io.OutputStream ; 63 import java.io.PrintWriter ; 64 import java.io.IOException ; 65 import java.util.Enumeration ; 66 67 75 public class hr extends SinglePartElement implements Printable, MouseEvents, KeyEvents 76 { 77 80 { 81 setElementType("hr"); 82 setCase(LOWERCASE); 83 setAttributeQuote(true); 84 setBeginEndModifier('/'); 85 } 86 87 90 public hr() 91 { 92 } 93 94 99 public hr(String width) 100 { 101 setWidth(width); 102 } 103 104 109 public hr(int width) 110 { 111 setWidth(width); 112 } 113 114 120 public hr(String width, String align) 121 { 122 setWidth(width); 123 setAlign(align); 124 } 125 126 132 public hr(int width, String align) 133 { 134 setWidth(width); 135 setAlign(align); 136 } 137 138 145 public hr(String width, String align, String size) 146 { 147 setWidth(width); 148 setAlign(align); 149 setSize(size); 150 } 151 152 159 public hr(String width, String align, int size) 160 { 161 setWidth(width); 162 setAlign(align); 163 setSize(size); 164 } 165 166 173 public hr(int width, String align, int size) 174 { 175 setWidth(width); 176 setAlign(align); 177 setSize(size); 178 } 179 180 184 public hr setWidth(String width) 185 { 186 addAttribute("width",width); 187 return this; 188 } 189 190 194 public hr setWidth(int width) 195 { 196 addAttribute("width",Integer.toString(width)); 197 return this; 198 } 199 200 204 public hr setAlign(String align) 205 { 206 addAttribute("align",align); 207 return this; 208 } 209 210 214 public hr setSize(String size) 215 { 216 addAttribute("size",size); 217 return this; 218 } 219 220 224 public hr setSize(int size) 225 { 226 addAttribute("size",Integer.toString(size)); 227 return this; 228 } 229 230 234 public hr setNoShade(boolean shade) 235 { 236 if ( shade == true ) 237 addAttribute("noshade", "noshade"); 238 else 239 removeAttribute("noshade"); 240 241 return(this); 242 } 243 244 248 public Element setLang(String lang) 249 { 250 addAttribute("lang",lang); 251 addAttribute("xml:lang",lang); 252 return this; 253 } 254 255 260 public hr addElement(String hashcode,Element element) 261 { 262 addElementToRegistry(hashcode,element); 263 return(this); 264 } 265 266 271 public hr addElement(String hashcode,String element) 272 { 273 addElementToRegistry(hashcode,element); 274 return(this); 275 } 276 277 281 public hr addElement(Element element) 282 { 283 addElementToRegistry(element); 284 return(this); 285 } 286 290 public hr addElement(String element) 291 { 292 addElementToRegistry(element); 293 return(this); 294 } 295 299 public hr removeElement(String hashcode) 300 { 301 removeElementFromRegistry(hashcode); 302 return(this); 303 } 304 305 311 public void setOnClick(String script) 312 { 313 addAttribute ( "onclick", script ); 314 } 315 321 public void setOnDblClick(String script) 322 { 323 addAttribute ( "ondblclick", script ); 324 } 325 331 public void setOnMouseDown(String script) 332 { 333 addAttribute ( "onmousedown", script ); 334 } 335 341 public void setOnMouseUp(String script) 342 { 343 addAttribute ( "onmouseup", script ); 344 } 345 351 public void setOnMouseOver(String script) 352 { 353 addAttribute ( "onmouseover", script ); 354 } 355 361 public void setOnMouseMove(String script) 362 { 363 addAttribute ( "onmousemove", script ); 364 } 365 371 public void setOnMouseOut(String script) 372 { 373 addAttribute ( "onmouseout", script ); 374 } 375 376 382 public void setOnKeyPress(String script) 383 { 384 addAttribute ( "onkeypress", script ); 385 } 386 387 393 public void setOnKeyDown(String script) 394 { 395 addAttribute ( "onkeydown", script ); 396 } 397 398 404 public void setOnKeyUp(String script) 405 { 406 addAttribute ( "onkeyup", script ); 407 } 408 } 409 | Popular Tags |