1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 63 71 public class label extends MultiPartElement implements Printable, PageEvents, MouseEvents, KeyEvents 72 { 73 76 { 77 setElementType("label"); 78 setCase(LOWERCASE); 79 setAttributeQuote(true); 80 } 81 82 85 public label() 86 { 87 } 88 89 93 public label(String value) 94 { 95 setFor(value); 96 } 97 98 103 public label(String value, String accesskey) 104 { 105 setFor(value); 106 } 107 108 112 public label setFor(String value) 113 { 114 addAttribute("for",value); 115 return(this); 116 } 117 118 122 public label setAccessKey(String accesskey) 123 { 124 addAttribute("accesskey",accesskey); 125 return(this); 126 } 127 128 132 public Element setLang(String lang) 133 { 134 addAttribute("lang",lang); 135 addAttribute("xml:lang",lang); 136 return this; 137 } 138 139 144 public label addElement(String hashcode,Element element) 145 { 146 addElementToRegistry(hashcode,element); 147 return(this); 148 } 149 150 155 public label addElement(String hashcode,String element) 156 { 157 addElementToRegistry(hashcode,element); 158 return(this); 159 } 160 161 165 public label addElement(Element element) 166 { 167 addElementToRegistry(element); 168 return(this); 169 } 170 171 175 public label addElement(String element) 176 { 177 addElementToRegistry(element); 178 return(this); 179 } 180 184 public label removeElement(String hashcode) 185 { 186 removeElementFromRegistry(hashcode); 187 return(this); 188 } 189 190 197 public void setOnLoad(String script) 198 { 199 addAttribute ( "onload", script ); 200 } 201 202 209 public void setOnUnload(String script) 210 { 211 addAttribute ( "onunload", script ); 212 } 213 214 220 public void setOnClick(String script) 221 { 222 addAttribute ( "onclick", script ); 223 } 224 230 public void setOnDblClick(String script) 231 { 232 addAttribute ( "ondblclick", script ); 233 } 234 240 public void setOnMouseDown(String script) 241 { 242 addAttribute ( "onmousedown", script ); 243 } 244 250 public void setOnMouseUp(String script) 251 { 252 addAttribute ( "onmouseup", script ); 253 } 254 260 public void setOnMouseOver(String script) 261 { 262 addAttribute ( "onmouseover", script ); 263 } 264 270 public void setOnMouseMove(String script) 271 { 272 addAttribute ( "onmousemove", script ); 273 } 274 280 public void setOnMouseOut(String script) 281 { 282 addAttribute ( "onmouseout", script ); 283 } 284 285 291 public void setOnKeyPress(String script) 292 { 293 addAttribute ( "onkeypress", script ); 294 } 295 296 302 public void setOnKeyDown(String script) 303 { 304 addAttribute ( "onkeydown", script ); 305 } 306 307 313 public void setOnKeyUp(String script) 314 { 315 addAttribute ( "onkeyup", script ); 316 } 317 } 318 | Popular Tags |