1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class Legend extends MultiPartElement implements Printable, MouseEvents, KeyEvents 70 { 71 74 { 75 setElementType("legend"); 76 } 77 78 81 public Legend() 82 { 83 } 84 85 89 public Legend(String value) 90 { 91 addElement(value); 92 } 93 94 98 public Legend(Element value) 99 { 100 addElement(value); 101 } 102 103 108 public Legend(String value, String accesskey) 109 { 110 addElement(value); 111 setAccessKey(accesskey); 112 } 113 114 119 public Legend(Element value, String accesskey) 120 { 121 addElement(value); 122 setAccessKey(accesskey); 123 } 124 125 129 public Legend setAccessKey(String accesskey) 130 { 131 addAttribute("accesskey",accesskey); 132 return(this); 133 } 134 135 140 public Legend addElement(String hashcode,Element element) 141 { 142 addElementToRegistry(hashcode,element); 143 return(this); 144 } 145 146 151 public Legend addElement(String hashcode,String element) 152 { 153 addElementToRegistry(hashcode,element); 154 return(this); 155 } 156 157 161 public Legend addElement(Element element) 162 { 163 addElementToRegistry(element); 164 return(this); 165 } 166 167 171 public Legend addElement(String element) 172 { 173 addElementToRegistry(element); 174 return(this); 175 } 176 180 public Legend removeElement(String hashcode) 181 { 182 removeElementFromRegistry(hashcode); 183 return(this); 184 } 185 186 192 public void setOnClick(String script) 193 { 194 addAttribute ( "onClick", script ); 195 } 196 202 public void setOnDblClick(String script) 203 { 204 addAttribute ( "onDblClick", script ); 205 } 206 212 public void setOnMouseDown(String script) 213 { 214 addAttribute ( "onMouseDown", script ); 215 } 216 222 public void setOnMouseUp(String script) 223 { 224 addAttribute ( "onMouseUp", script ); 225 } 226 232 public void setOnMouseOver(String script) 233 { 234 addAttribute ( "onMouseOver", script ); 235 } 236 242 public void setOnMouseMove(String script) 243 { 244 addAttribute ( "onMouseMove", script ); 245 } 246 252 public void setOnMouseOut(String script) 253 { 254 addAttribute ( "onMouseOut", script ); 255 } 256 257 263 public void setOnKeyPress(String script) 264 { 265 addAttribute ( "onKeyPress", script ); 266 } 267 268 274 public void setOnKeyDown(String script) 275 { 276 addAttribute ( "onKeyDown", script ); 277 } 278 279 285 public void setOnKeyUp(String script) 286 { 287 addAttribute ( "onKeyUp", script ); 288 } 289 } 290 | Popular Tags |