1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class link extends SinglePartElement implements Printable, MouseEvents, KeyEvents 71 { 72 73 76 77 { 78 setElementType("link"); 79 setCase(LOWERCASE); 80 setAttributeQuote(true); 81 setBeginEndModifier('/'); 82 } 83 84 88 public link() 89 { 90 } 91 92 public link setHref(String href) 93 { 94 addAttribute("href",href); 95 return this; 96 } 97 98 102 public link setTarget(String target) 103 { 104 addAttribute("target",target); 105 return this; 106 } 107 108 112 public link setRel(String rel) 113 { 114 addAttribute("rel",rel); 115 return this; 116 } 117 118 122 public link setRev(String rev) 123 { 124 addAttribute("rev",rev); 125 return this; 126 } 127 128 132 public link setCharset(String charset) 133 { 134 addAttribute("charset",charset); 135 return this; 136 } 137 138 142 public link setType(String type) 143 { 144 addAttribute("type",type); 145 return this; 146 } 147 148 152 153 public link setMedia(String media) 154 { 155 addAttribute("media",media); 156 return this; 157 } 158 159 163 public Element setLang(String lang) 164 { 165 addAttribute("lang",lang); 166 addAttribute("xml:lang",lang); 167 return this; 168 } 169 170 175 public link addElement(String hashcode,Element element) 176 { 177 addElementToRegistry(hashcode,element); 178 return(this); 179 } 180 181 186 public link addElement(String hashcode,String element) 187 { 188 addElementToRegistry(hashcode,element); 189 return(this); 190 } 191 195 public link addElement(Element element) 196 { 197 addElementToRegistry(element); 198 return(this); 199 } 200 201 205 public link addElement(String element) 206 { 207 addElementToRegistry(element); 208 return(this); 209 } 210 214 public link removeElement(String hashcode) 215 { 216 removeElementFromRegistry(hashcode); 217 return(this); 218 } 219 220 226 public void setOnClick(String script) 227 { 228 addAttribute ( "onclick", script ); 229 } 230 236 public void setOnDblClick(String script) 237 { 238 addAttribute ( "ondblclick", script ); 239 } 240 246 public void setOnMouseDown(String script) 247 { 248 addAttribute ( "onmousedown", script ); 249 } 250 256 public void setOnMouseUp(String script) 257 { 258 addAttribute ( "onmouseup", script ); 259 } 260 266 public void setOnMouseOver(String script) 267 { 268 addAttribute ( "onmouseover", script ); 269 } 270 276 public void setOnMouseMove(String script) 277 { 278 addAttribute ( "onmousemove", script ); 279 } 280 286 public void setOnMouseOut(String script) 287 { 288 addAttribute ( "onmouseout", script ); 289 } 290 291 297 public void setOnKeyPress(String script) 298 { 299 addAttribute ( "onkeypress", script ); 300 } 301 302 308 public void setOnKeyDown(String script) 309 { 310 addAttribute ( "onkeydown", script ); 311 } 312 313 319 public void setOnKeyUp(String script) 320 { 321 addAttribute ( "onkeyup", script ); 322 } 323 } 324 | Popular Tags |