1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 63 70 public class Label extends MultiPartElement implements Printable, PageEvents, MouseEvents, KeyEvents 71 { 72 75 { 76 setElementType("label"); 77 } 78 79 82 public Label() 83 { 84 } 85 86 90 public Label(String value) 91 { 92 setFor(value); 93 } 94 95 100 public Label(String value, String accesskey) 101 { 102 setFor(value); 103 } 104 105 109 public Label setFor(String value) 110 { 111 addAttribute("for",value); 112 return(this); 113 } 114 115 119 public Label setAccessKey(String accesskey) 120 { 121 addAttribute("accesskey",accesskey); 122 return(this); 123 } 124 125 130 public Label addElement(String hashcode,Element element) 131 { 132 addElementToRegistry(hashcode,element); 133 return(this); 134 } 135 136 141 public Label addElement(String hashcode,String element) 142 { 143 addElementToRegistry(hashcode,element); 144 return(this); 145 } 146 147 151 public Label addElement(Element element) 152 { 153 addElementToRegistry(element); 154 return(this); 155 } 156 157 161 public Label addElement(String element) 162 { 163 addElementToRegistry(element); 164 return(this); 165 } 166 170 public Label removeElement(String hashcode) 171 { 172 removeElementFromRegistry(hashcode); 173 return(this); 174 } 175 176 183 public void setOnLoad(String script) 184 { 185 addAttribute ( "onLoad", script ); 186 } 187 188 195 public void setOnUnload(String script) 196 { 197 addAttribute ( "onUnload", script ); 198 } 199 200 206 public void setOnClick(String script) 207 { 208 addAttribute ( "onClick", script ); 209 } 210 216 public void setOnDblClick(String script) 217 { 218 addAttribute ( "onDblClick", script ); 219 } 220 226 public void setOnMouseDown(String script) 227 { 228 addAttribute ( "onMouseDown", script ); 229 } 230 236 public void setOnMouseUp(String script) 237 { 238 addAttribute ( "onMouseUp", script ); 239 } 240 246 public void setOnMouseOver(String script) 247 { 248 addAttribute ( "onMouseOver", script ); 249 } 250 256 public void setOnMouseMove(String script) 257 { 258 addAttribute ( "onMouseMove", script ); 259 } 260 266 public void setOnMouseOut(String script) 267 { 268 addAttribute ( "onMouseOut", script ); 269 } 270 271 277 public void setOnKeyPress(String script) 278 { 279 addAttribute ( "onKeyPress", script ); 280 } 281 282 288 public void setOnKeyDown(String script) 289 { 290 addAttribute ( "onKeyDown", script ); 291 } 292 293 299 public void setOnKeyUp(String script) 300 { 301 addAttribute ( "onKeyUp", script ); 302 } 303 } 304 | Popular Tags |