1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 69 public class tr extends MultiPartElement implements Printable, MouseEvents, KeyEvents 70 { 71 74 { 75 setElementType("tr"); 76 setCase(LOWERCASE); 77 setAttributeQuote(true); 78 } 79 82 public tr() 83 { 84 } 85 86 89 public tr(Element element) 90 { 91 addElement(element); 92 } 93 94 97 public tr(String element) 98 { 99 addElement(element); 100 } 101 102 110 114 public tr setAlign(String align) 115 { 116 addAttribute("align",align); 117 return(this); 118 } 119 120 124 public tr setVAlign(String valign) 125 { 126 addAttribute("valign",valign); 127 return(this); 128 } 129 130 134 public tr setChar(String character) 135 { 136 addAttribute("char",character); 137 return(this); 138 } 139 140 145 public tr setCharOff(int char_off) 146 { 147 addAttribute("charoff",Integer.toString(char_off)); 148 return(this); 149 } 150 151 156 public tr setCharOff(String char_off) 157 { 158 addAttribute("charoff",char_off); 159 return(this); 160 } 161 162 166 public tr setBgColor(String color) 167 { 168 addAttribute("bgcolor",HtmlColor.convertColor(color)); 169 return(this); 170 } 171 172 176 public Element setLang(String lang) 177 { 178 addAttribute("lang",lang); 179 addAttribute("xml:lang",lang); 180 return this; 181 } 182 183 188 public tr addElement(String hashcode,Element element) 189 { 190 addElementToRegistry(hashcode,element); 191 return(this); 192 } 193 194 199 public tr addElement(String hashcode,String element) 200 { 201 addElementToRegistry(hashcode,element); 202 return(this); 203 } 204 205 209 public tr addElement(Element element) 210 { 211 addElementToRegistry(element); 212 return(this); 213 } 214 215 219 public tr addElement(String element) 220 { 221 addElementToRegistry(element); 222 return(this); 223 } 224 228 public tr removeElement(String hashcode) 229 { 230 removeElementFromRegistry(hashcode); 231 return(this); 232 } 233 234 240 public void setOnClick(String script) 241 { 242 addAttribute ( "onclick", script ); 243 } 244 250 public void setOnDblClick(String script) 251 { 252 addAttribute ( "ondblclick", script ); 253 } 254 260 public void setOnMouseDown(String script) 261 { 262 addAttribute ( "onmousedown", script ); 263 } 264 270 public void setOnMouseUp(String script) 271 { 272 addAttribute ( "onmouseup", script ); 273 } 274 280 public void setOnMouseOver(String script) 281 { 282 addAttribute ( "onmouseover", script ); 283 } 284 290 public void setOnMouseMove(String script) 291 { 292 addAttribute ( "onmousemove", script ); 293 } 294 300 public void setOnMouseOut(String script) 301 { 302 addAttribute ( "onmouseout", script ); 303 } 304 305 311 public void setOnKeyPress(String script) 312 { 313 addAttribute ( "onkeypress", script ); 314 } 315 316 322 public void setOnKeyDown(String script) 323 { 324 addAttribute ( "onkeydown", script ); 325 } 326 327 333 public void setOnKeyUp(String script) 334 { 335 addAttribute ( "onkeyup", script ); 336 } 337 } 338 | Popular Tags |