1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class UL extends MultiPartElement implements Printable, MouseEvents, KeyEvents 70 { 71 74 { 75 setElementType("ul"); 76 } 77 80 public UL() 81 { 82 } 83 84 88 public UL(LI[] list) 89 { 90 addElement(list); 91 } 92 93 97 public UL(String [] list) 98 { 99 addElement(list); 100 } 101 102 106 public UL addElement(LI[] list) 107 { 108 for(int x = 0; x < list.length; x++) 109 { 110 addElement(list[x]); 111 } 112 return(this); 113 } 114 115 120 public UL addElement(String hashcode,Element element) 121 { 122 addElementToRegistry(hashcode,element); 123 return(this); 124 } 125 126 131 public UL addElement(String hashcode,String element) 132 { 133 addElementToRegistry(hashcode,element); 134 return(this); 135 } 136 137 141 public UL addElement(Element element) 142 { 143 addElementToRegistry(element); 144 return(this); 145 } 146 147 151 public UL addElement(String element) 152 { 153 addElementToRegistry(element); 154 return(this); 155 } 156 157 161 public UL addElement(String [] element) 162 { 163 LI[] li = new LI().addElement(element); 164 addElement(li); 165 return(this); 166 } 167 171 public UL removeElement(String hashcode) 172 { 173 removeElementFromRegistry(hashcode); 174 return(this); 175 } 176 177 183 public void setOnClick(String script) 184 { 185 addAttribute ( "onClick", script ); 186 } 187 193 public void setOnDblClick(String script) 194 { 195 addAttribute ( "onDblClick", script ); 196 } 197 203 public void setOnMouseDown(String script) 204 { 205 addAttribute ( "onMouseDown", script ); 206 } 207 213 public void setOnMouseUp(String script) 214 { 215 addAttribute ( "onMouseUp", script ); 216 } 217 223 public void setOnMouseOver(String script) 224 { 225 addAttribute ( "onMouseOver", script ); 226 } 227 233 public void setOnMouseMove(String script) 234 { 235 addAttribute ( "onMouseMove", script ); 236 } 237 243 public void setOnMouseOut(String script) 244 { 245 addAttribute ( "onMouseOut", script ); 246 } 247 248 254 public void setOnKeyPress(String script) 255 { 256 addAttribute ( "onKeyPress", script ); 257 } 258 259 265 public void setOnKeyDown(String script) 266 { 267 addAttribute ( "onKeyDown", script ); 268 } 269 270 276 public void setOnKeyUp(String script) 277 { 278 addAttribute ( "onKeyUp", script ); 279 } 280 } 281 | Popular Tags |