1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 68 public class TR extends MultiPartElement implements Printable, MouseEvents, KeyEvents 69 { 70 73 { 74 setElementType("tr"); 75 } 76 79 public TR() 80 { 81 } 82 83 86 public TR(Element element) 87 { 88 addElement(element); 89 } 90 91 94 public TR(String element) 95 { 96 addElement(element); 97 } 98 99 103 public TR(boolean close) 104 { 105 setNeedClosingTag(close); 106 } 107 111 public TR setAlign(String align) 112 { 113 addAttribute("align",align); 114 return(this); 115 } 116 117 121 public TR setVAlign(String valign) 122 { 123 addAttribute("valign",valign); 124 return(this); 125 } 126 127 131 public TR setChar(String character) 132 { 133 addAttribute("char",character); 134 return(this); 135 } 136 137 142 public TR setCharOff(int char_off) 143 { 144 addAttribute("charoff",Integer.toString(char_off)); 145 return(this); 146 } 147 148 153 public TR setCharOff(String char_off) 154 { 155 addAttribute("charoff",char_off); 156 return(this); 157 } 158 159 163 public TR setBgColor(String color) 164 { 165 addAttribute("bgcolor",HtmlColor.convertColor(color)); 166 return(this); 167 } 168 169 174 public TR addElement(String hashcode,Element element) 175 { 176 addElementToRegistry(hashcode,element); 177 return(this); 178 } 179 180 185 public TR addElement(String hashcode,String element) 186 { 187 addElementToRegistry(hashcode,element); 188 return(this); 189 } 190 191 195 public TR addElement(Element element) 196 { 197 addElementToRegistry(element); 198 return(this); 199 } 200 201 205 public TR addElement(String element) 206 { 207 addElementToRegistry(element); 208 return(this); 209 } 210 214 public TR removeElement(String hashcode) 215 { 216 removeElementFromRegistry(hashcode); 217 return(this); 218 } 219 220 226 public void setOnClick(String script) 227 { 228 addAttribute ( "onClick", script ); 229 } 230 236 public void setOnDblClick(String script) 237 { 238 addAttribute ( "onDblClick", script ); 239 } 240 246 public void setOnMouseDown(String script) 247 { 248 addAttribute ( "onMouseDown", script ); 249 } 250 256 public void setOnMouseUp(String script) 257 { 258 addAttribute ( "onMouseUp", script ); 259 } 260 266 public void setOnMouseOver(String script) 267 { 268 addAttribute ( "onMouseOver", script ); 269 } 270 276 public void setOnMouseMove(String script) 277 { 278 addAttribute ( "onMouseMove", script ); 279 } 280 286 public void setOnMouseOut(String script) 287 { 288 addAttribute ( "onMouseOut", script ); 289 } 290 291 297 public void setOnKeyPress(String script) 298 { 299 addAttribute ( "onKeyPress", script ); 300 } 301 302 308 public void setOnKeyDown(String script) 309 { 310 addAttribute ( "onKeyDown", script ); 311 } 312 313 319 public void setOnKeyUp(String script) 320 { 321 addAttribute ( "onKeyUp", script ); 322 } 323 } 324 | Popular Tags |