1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class h2 extends MultiPartElement implements Printable, MouseEvents, KeyEvents 71 { 72 75 { 76 setElementType("h2"); 77 setCase(LOWERCASE); 78 setAttributeQuote(true); 79 } 80 81 85 public h2() 86 { 87 } 88 89 95 public h2(Element element) 96 { 97 addElement(element); 98 } 99 100 106 public h2(String value) 107 { 108 addElement(value); 109 } 110 114 118 public Element setLang(String lang) 119 { 120 addAttribute("lang",lang); 121 addAttribute("xml:lang",lang); 122 return this; 123 } 124 125 130 public h2 addElement(String hashcode,Element element) 131 { 132 addElementToRegistry(hashcode,element); 133 return(this); 134 } 135 136 141 public h2 addElement(String hashcode,String element) 142 { 143 addElementToRegistry(hashcode,element); 144 return(this); 145 } 146 147 public h2 addElement(Element element) 148 { 149 addElementToRegistry(element); 150 return(this); 151 } 152 156 public h2 addElement(String element) 157 { 158 addElementToRegistry(element); 159 return(this); 160 } 161 165 public h2 removeElement(String hashcode) 166 { 167 removeElementFromRegistry(hashcode); 168 return(this); 169 } 170 171 177 public void setOnClick(String script) 178 { 179 addAttribute ( "onclick", script ); 180 } 181 187 public void setOnDblClick(String script) 188 { 189 addAttribute ( "ondblclick", script ); 190 } 191 197 public void setOnMouseDown(String script) 198 { 199 addAttribute ( "onmousedown", script ); 200 } 201 207 public void setOnMouseUp(String script) 208 { 209 addAttribute ( "onmouseup", script ); 210 } 211 217 public void setOnMouseOver(String script) 218 { 219 addAttribute ( "onmouseover", script ); 220 } 221 227 public void setOnMouseMove(String script) 228 { 229 addAttribute ( "onmousemove", script ); 230 } 231 237 public void setOnMouseOut(String script) 238 { 239 addAttribute ( "onmouseout", script ); 240 } 241 242 248 public void setOnKeyPress(String script) 249 { 250 addAttribute ( "onkeypress", script ); 251 } 252 253 259 public void setOnKeyDown(String script) 260 { 261 addAttribute ( "onkeydown", script ); 262 } 263 264 270 public void setOnKeyUp(String script) 271 { 272 addAttribute ( "onkeyup", script ); 273 } 274 } 275 | Popular Tags |