1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 63 71 public class tt extends MultiPartElement implements Printable, MouseEvents, KeyEvents 72 { 73 76 { 77 setElementType("tt"); 78 setCase(LOWERCASE); 79 setAttributeQuote(true); 80 } 81 84 public tt() 85 { 86 } 87 88 92 public tt(Element element) 93 { 94 addElement(element); 95 } 96 97 101 public tt(String element) 102 { 103 addElement(element); 104 } 105 106 110 public Element setLang(String lang) 111 { 112 addAttribute("lang",lang); 113 addAttribute("xml:lang",lang); 114 return this; 115 } 116 117 122 public tt addElement(String hashcode,Element element) 123 { 124 addElementToRegistry(hashcode,element); 125 return(this); 126 } 127 128 133 public tt addElement(String hashcode,String element) 134 { 135 addElementToRegistry(hashcode,element); 136 return(this); 137 } 138 139 143 public tt addElement(Element element) 144 { 145 addElementToRegistry(element); 146 return(this); 147 } 148 149 153 public tt addElement(String element) 154 { 155 addElementToRegistry(element); 156 return(this); 157 } 158 162 public tt removeElement(String hashcode) 163 { 164 removeElementFromRegistry(hashcode); 165 return(this); 166 } 167 168 174 public void setOnClick(String script) 175 { 176 addAttribute ( "onclick", script ); 177 } 178 184 public void setOnDblClick(String script) 185 { 186 addAttribute ( "ondblclick", script ); 187 } 188 194 public void setOnMouseDown(String script) 195 { 196 addAttribute ( "onmousedown", script ); 197 } 198 204 public void setOnMouseUp(String script) 205 { 206 addAttribute ( "onmouseup", script ); 207 } 208 214 public void setOnMouseOver(String script) 215 { 216 addAttribute ( "onmouseover", script ); 217 } 218 224 public void setOnMouseMove(String script) 225 { 226 addAttribute ( "onmousemove", script ); 227 } 228 234 public void setOnMouseOut(String script) 235 { 236 addAttribute ( "onmouseout", script ); 237 } 238 239 245 public void setOnKeyPress(String script) 246 { 247 addAttribute ( "onkeypress", script ); 248 } 249 250 256 public void setOnKeyDown(String script) 257 { 258 addAttribute ( "onkeydown", script ); 259 } 260 261 267 public void setOnKeyUp(String script) 268 { 269 addAttribute ( "onkeyup", script ); 270 } 271 } 272 | Popular Tags |