1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class Span extends MultiPartElement implements Printable, MouseEvents, KeyEvents 70 { 71 74 { 75 setElementType("span"); 76 } 77 78 82 public Span() 83 { 84 } 85 86 92 public Span(String value) 93 { 94 addElement(value); 95 } 96 97 102 public Span addElement(String hashcode,Element element) 103 { 104 addElementToRegistry(hashcode,element); 105 return(this); 106 } 107 108 113 public Span addElement(String hashcode,String element) 114 { 115 addElementToRegistry(hashcode,element); 116 return(this); 117 } 118 119 123 public Span addElement(Element element) 124 { 125 addElementToRegistry(element); 126 return(this); 127 } 128 132 public Span addElement(String element) 133 { 134 addElementToRegistry(element); 135 return(this); 136 } 137 141 public Span removeElement(String hashcode) 142 { 143 removeElementFromRegistry(hashcode); 144 return(this); 145 } 146 147 153 public void setOnClick(String script) 154 { 155 addAttribute ( "onClick", script ); 156 } 157 163 public void setOnDblClick(String script) 164 { 165 addAttribute ( "onDblClick", script ); 166 } 167 173 public void setOnMouseDown(String script) 174 { 175 addAttribute ( "onMouseDown", script ); 176 } 177 183 public void setOnMouseUp(String script) 184 { 185 addAttribute ( "onMouseUp", script ); 186 } 187 193 public void setOnMouseOver(String script) 194 { 195 addAttribute ( "onMouseOver", script ); 196 } 197 203 public void setOnMouseMove(String script) 204 { 205 addAttribute ( "onMouseMove", script ); 206 } 207 213 public void setOnMouseOut(String script) 214 { 215 addAttribute ( "onMouseOut", script ); 216 } 217 218 224 public void setOnKeyPress(String script) 225 { 226 addAttribute ( "onKeyPress", script ); 227 } 228 229 235 public void setOnKeyDown(String script) 236 { 237 addAttribute ( "onKeyDown", script ); 238 } 239 240 246 public void setOnKeyUp(String script) 247 { 248 addAttribute ( "onKeyUp", script ); 249 } 250 } 251 | Popular Tags |