1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class Link extends SinglePartElement implements Printable, MouseEvents, KeyEvents 70 { 71 72 75 76 { 77 setElementType("link"); 78 } 79 80 84 public Link() 85 { 86 } 87 88 public Link setHref(String href) 89 { 90 addAttribute("href",href); 91 return this; 92 } 93 94 98 public Link setTarget(String target) 99 { 100 addAttribute("target",target); 101 return this; 102 } 103 104 108 public Link setRel(String rel) 109 { 110 addAttribute("rel",rel); 111 return this; 112 } 113 114 118 public Link setRev(String rev) 119 { 120 addAttribute("rev",rev); 121 return this; 122 } 123 124 128 public Link setCharset(String charset) 129 { 130 addAttribute("charset",charset); 131 return this; 132 } 133 134 138 public Link setType(String type) 139 { 140 addAttribute("type",type); 141 return this; 142 } 143 144 148 149 public Link setMedia(String media) 150 { 151 addAttribute("media",media); 152 return this; 153 } 154 155 160 public Link addElement(String hashcode,Element element) 161 { 162 addElementToRegistry(hashcode,element); 163 return(this); 164 } 165 166 171 public Link addElement(String hashcode,String element) 172 { 173 addElementToRegistry(hashcode,element); 174 return(this); 175 } 176 180 public Link addElement(Element element) 181 { 182 addElementToRegistry(element); 183 return(this); 184 } 185 186 190 public Link addElement(String element) 191 { 192 addElementToRegistry(element); 193 return(this); 194 } 195 199 public Link removeElement(String hashcode) 200 { 201 removeElementFromRegistry(hashcode); 202 return(this); 203 } 204 205 211 public void setOnClick(String script) 212 { 213 addAttribute ( "onClick", script ); 214 } 215 221 public void setOnDblClick(String script) 222 { 223 addAttribute ( "onDblClick", script ); 224 } 225 231 public void setOnMouseDown(String script) 232 { 233 addAttribute ( "onMouseDown", script ); 234 } 235 241 public void setOnMouseUp(String script) 242 { 243 addAttribute ( "onMouseUp", script ); 244 } 245 251 public void setOnMouseOver(String script) 252 { 253 addAttribute ( "onMouseOver", script ); 254 } 255 261 public void setOnMouseMove(String script) 262 { 263 addAttribute ( "onMouseMove", script ); 264 } 265 271 public void setOnMouseOut(String script) 272 { 273 addAttribute ( "onMouseOut", script ); 274 } 275 276 282 public void setOnKeyPress(String script) 283 { 284 addAttribute ( "onKeyPress", script ); 285 } 286 287 293 public void setOnKeyDown(String script) 294 { 295 addAttribute ( "onKeyDown", script ); 296 } 297 298 304 public void setOnKeyUp(String script) 305 { 306 addAttribute ( "onKeyUp", script ); 307 } 308 } 309 | Popular Tags |