1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class OL extends MultiPartElement implements Printable, MouseEvents, KeyEvents 70 { 71 74 75 { 76 setElementType("ol"); 77 } 78 81 public OL() 82 { 83 } 84 85 89 public OL(LI[] list) 90 { 91 addElement(list); 92 } 93 94 99 public OL(String [] list) 100 { 101 addElement(list); 102 } 103 104 109 public OL addElement(String hashcode,Element element) 110 { 111 addElementToRegistry(hashcode,element); 112 return(this); 113 } 114 115 120 public OL addElement(String hashcode,String element) 121 { 122 addElementToRegistry(hashcode,element); 123 return(this); 124 } 125 126 130 public OL addElement(LI[] list) 131 { 132 for(int x = 0; x < list.length; x++) 133 { 134 addElement(list[x]); 135 } 136 return(this); 137 } 138 139 143 public OL addElement(Element element) 144 { 145 addElementToRegistry(element); 146 return(this); 147 } 148 149 153 public OL addElement(String element) 154 { 155 addElementToRegistry(element); 156 return(this); 157 } 158 159 163 public OL addElement(String [] element) 164 { 165 LI[] li = new LI().addElement(element); 166 addElement(li); 167 return(this); 168 } 169 173 public OL removeElement(String hashcode) 174 { 175 removeElementFromRegistry(hashcode); 176 return(this); 177 } 178 179 185 public void setOnClick(String script) 186 { 187 addAttribute ( "onClick", script ); 188 } 189 195 public void setOnDblClick(String script) 196 { 197 addAttribute ( "onDblClick", script ); 198 } 199 205 public void setOnMouseDown(String script) 206 { 207 addAttribute ( "onMouseDown", script ); 208 } 209 215 public void setOnMouseUp(String script) 216 { 217 addAttribute ( "onMouseUp", script ); 218 } 219 225 public void setOnMouseOver(String script) 226 { 227 addAttribute ( "onMouseOver", script ); 228 } 229 235 public void setOnMouseMove(String script) 236 { 237 addAttribute ( "onMouseMove", script ); 238 } 239 245 public void setOnMouseOut(String script) 246 { 247 addAttribute ( "onMouseOut", script ); 248 } 249 250 256 public void setOnKeyPress(String script) 257 { 258 addAttribute ( "onKeyPress", script ); 259 } 260 261 267 public void setOnKeyDown(String script) 268 { 269 addAttribute ( "onKeyDown", script ); 270 } 271 272 278 public void setOnKeyUp(String script) 279 { 280 addAttribute ( "onKeyUp", script ); 281 } 282 } 283 | Popular Tags |