1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class ol extends MultiPartElement implements Printable, MouseEvents, KeyEvents 71 { 72 75 76 { 77 setElementType("ol"); 78 setCase(LOWERCASE); 79 setAttributeQuote(true); 80 } 81 84 public ol() 85 { 86 } 87 88 92 public ol(li[] list) 93 { 94 addElement(list); 95 } 96 97 102 public ol(String [] list) 103 { 104 addElement(list); 105 } 106 107 111 public Element setLang(String lang) 112 { 113 addAttribute("lang",lang); 114 addAttribute("xml:lang",lang); 115 return this; 116 } 117 118 123 public ol addElement(String hashcode,Element element) 124 { 125 addElementToRegistry(hashcode,element); 126 return(this); 127 } 128 129 134 public ol addElement(String hashcode,String element) 135 { 136 addElementToRegistry(hashcode,element); 137 return(this); 138 } 139 140 144 public ol addElement(li[] list) 145 { 146 for(int x = 0; x < list.length; x++) 147 { 148 addElement(list[x]); 149 } 150 return(this); 151 } 152 153 157 public ol addElement(Element element) 158 { 159 addElementToRegistry(element); 160 return(this); 161 } 162 163 167 public ol addElement(String element) 168 { 169 addElementToRegistry(element); 170 return(this); 171 } 172 173 177 public ol addElement(String [] element) 178 { 179 li[] li = new li().addElement(element); 180 addElement(li); 181 return(this); 182 } 183 187 public ol removeElement(String hashcode) 188 { 189 removeElementFromRegistry(hashcode); 190 return(this); 191 } 192 193 199 public void setOnClick(String script) 200 { 201 addAttribute ( "onclick", script ); 202 } 203 209 public void setOnDblClick(String script) 210 { 211 addAttribute ( "ondblclick", script ); 212 } 213 219 public void setOnMouseDown(String script) 220 { 221 addAttribute ( "onmousedown", script ); 222 } 223 229 public void setOnMouseUp(String script) 230 { 231 addAttribute ( "onmouseup", script ); 232 } 233 239 public void setOnMouseOver(String script) 240 { 241 addAttribute ( "onmouseover", script ); 242 } 243 249 public void setOnMouseMove(String script) 250 { 251 addAttribute ( "onmousemove", script ); 252 } 253 259 public void setOnMouseOut(String script) 260 { 261 addAttribute ( "onmouseout", script ); 262 } 263 264 270 public void setOnKeyPress(String script) 271 { 272 addAttribute ( "onkeypress", script ); 273 } 274 275 281 public void setOnKeyDown(String script) 282 { 283 addAttribute ( "onkeydown", script ); 284 } 285 286 292 public void setOnKeyUp(String script) 293 { 294 addAttribute ( "onkeyup", script ); 295 } 296 } 297 | Popular Tags |