1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class legend extends MultiPartElement implements Printable, MouseEvents, KeyEvents 71 { 72 75 { 76 setElementType("legend"); 77 setCase(LOWERCASE); 78 setAttributeQuote(true); 79 } 80 81 84 public legend() 85 { 86 } 87 88 92 public legend(String value) 93 { 94 addElement(value); 95 } 96 97 101 public legend(Element value) 102 { 103 addElement(value); 104 } 105 106 111 public legend(String value, String accesskey) 112 { 113 addElement(value); 114 setAccessKey(accesskey); 115 } 116 117 122 public legend(Element value, String accesskey) 123 { 124 addElement(value); 125 setAccessKey(accesskey); 126 } 127 128 132 public legend setAccessKey(String accesskey) 133 { 134 addAttribute("accesskey",accesskey); 135 return(this); 136 } 137 138 142 public Element setLang(String lang) 143 { 144 addAttribute("lang",lang); 145 addAttribute("xml:lang",lang); 146 return this; 147 } 148 149 154 public legend addElement(String hashcode,Element element) 155 { 156 addElementToRegistry(hashcode,element); 157 return(this); 158 } 159 160 165 public legend addElement(String hashcode,String element) 166 { 167 addElementToRegistry(hashcode,element); 168 return(this); 169 } 170 171 175 public legend addElement(Element element) 176 { 177 addElementToRegistry(element); 178 return(this); 179 } 180 181 185 public legend addElement(String element) 186 { 187 addElementToRegistry(element); 188 return(this); 189 } 190 194 public legend removeElement(String hashcode) 195 { 196 removeElementFromRegistry(hashcode); 197 return(this); 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 |