1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 69 public class th extends MultiPartElement implements Printable, MouseEvents, KeyEvents 70 { 71 74 { 75 setElementType("th"); 76 setCase(LOWERCASE); 77 setAttributeQuote(true); 78 } 79 80 83 public th() 84 { 85 } 86 87 90 public th(Element element) 91 { 92 addElement(element); 93 } 94 95 98 public th(String element) 99 { 100 addElement(element); 101 } 102 103 111 112 116 public th setAbbr(String cdata) 117 { 118 addAttribute("abbr",cdata); 119 return(this); 120 } 121 122 126 public th setAxis(String cdata) 127 { 128 addAttribute("axis",cdata); 129 return(this); 130 } 131 132 136 public th setAxes(String id_refs) 137 { 138 addAttribute("axes",id_refs); 139 return(this); 140 } 141 142 146 public th setRowSpan(int span) 147 { 148 addAttribute("rowspan",Integer.toString(span)); 149 return(this); 150 } 151 152 156 public th setRowSpan(String span) 157 { 158 addAttribute("rowspan",span); 159 return(this); 160 } 161 162 166 public th setColSpan(int span) 167 { 168 addAttribute("colspan",Integer.toString(span)); 169 return(this); 170 } 171 172 176 public th setColSpan(String span) 177 { 178 addAttribute("colspan",span); 179 return(this); 180 } 181 182 186 public th setNoWrap(boolean wrap) 187 { 188 if ( wrap == true ) 189 addAttribute("nowrap", "nowrap"); 190 else 191 removeAttribute("nowrap"); 192 193 return(this); 194 } 195 196 200 public th setWidth(int width) 201 { 202 addAttribute("width",Integer.toString(width)); 203 return(this); 204 } 205 206 210 public th setWidth(String width) 211 { 212 addAttribute("width",width); 213 return(this); 214 } 215 216 220 public th setHeight(int height) 221 { 222 addAttribute("height",Integer.toString(height)); 223 return(this); 224 } 225 226 230 public th setHeight(String height) 231 { 232 addAttribute("height",height); 233 return(this); 234 } 235 236 240 public th setAlign(String align) 241 { 242 addAttribute("align",align); 243 return(this); 244 } 245 246 250 public th setVAlign(String valign) 251 { 252 addAttribute("valign",valign); 253 return(this); 254 } 255 256 260 public th setChar(String character) 261 { 262 addAttribute("char",character); 263 return(this); 264 } 265 266 271 public th setCharOff(int char_off) 272 { 273 addAttribute("charoff",Integer.toString(char_off)); 274 return(this); 275 } 276 277 282 public th setCharOff(String char_off) 283 { 284 addAttribute("charoff",char_off); 285 return(this); 286 } 287 288 292 public th setBgColor(String color) 293 { 294 addAttribute("bgcolor",HtmlColor.convertColor(color)); 295 return(this); 296 } 297 298 302 public Element setLang(String lang) 303 { 304 addAttribute("lang",lang); 305 addAttribute("xml:lang",lang); 306 return this; 307 } 308 309 314 public th addElement(String hashcode,Element element) 315 { 316 addElementToRegistry(hashcode,element); 317 return(this); 318 } 319 320 325 public th addElement(String hashcode,String element) 326 { 327 addElementToRegistry(hashcode,element); 328 return(this); 329 } 330 331 335 public th addElement(Element element) 336 { 337 addElementToRegistry(element); 338 return(this); 339 } 340 341 345 public th addElement(String element) 346 { 347 addElementToRegistry(element); 348 return(this); 349 } 350 354 public th removeElement(String hashcode) 355 { 356 removeElementFromRegistry(hashcode); 357 return(this); 358 } 359 360 366 public void setOnClick(String script) 367 { 368 addAttribute ( "onclick", script ); 369 } 370 376 public void setOnDblClick(String script) 377 { 378 addAttribute ( "ondblclick", script ); 379 } 380 386 public void setOnMouseDown(String script) 387 { 388 addAttribute ( "onmousedown", script ); 389 } 390 396 public void setOnMouseUp(String script) 397 { 398 addAttribute ( "onmouseup", script ); 399 } 400 406 public void setOnMouseOver(String script) 407 { 408 addAttribute ( "onmouseover", script ); 409 } 410 416 public void setOnMouseMove(String script) 417 { 418 addAttribute ( "onmousemove", script ); 419 } 420 426 public void setOnMouseOut(String script) 427 { 428 addAttribute ( "onmouseout", script ); 429 } 430 431 437 public void setOnKeyPress(String script) 438 { 439 addAttribute ( "onkeypress", script ); 440 } 441 442 448 public void setOnKeyDown(String script) 449 { 450 addAttribute ( "onkeydown", script ); 451 } 452 453 459 public void setOnKeyUp(String script) 460 { 461 addAttribute ( "onkeyup", script ); 462 } 463 } 464 | Popular Tags |