1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 74 public class li extends MultiPartElement implements Printable, MouseEvents, KeyEvents 75 { 76 79 { 80 setElementType("li"); 81 setCase(LOWERCASE); 82 setAttributeQuote(true); 83 } 84 85 88 public li() 89 { 90 } 91 92 96 public li(String value) 97 { 98 addElement(value); 99 } 100 101 105 public li(Element element) 106 { 107 addElement(element); 108 } 109 110 114 public Element setLang(String lang) 115 { 116 addAttribute("lang",lang); 117 addAttribute("xml:lang",lang); 118 return this; 119 } 120 121 126 public li addElement(String hashcode,Element element) 127 { 128 addElementToRegistry(hashcode,element); 129 return(this); 130 } 131 132 137 public li addElement(String hashcode,String element) 138 { 139 addElementToRegistry(hashcode,element); 140 return(this); 141 } 142 143 147 public li[] addElement(String [] element) 148 { 149 li[] li = new li[element.length]; 150 for(int x = 0; x < element.length; x++) 151 { 152 li[x] = new li(element[x]); 153 } 154 return(li); 155 } 156 157 161 public li addElement(Element element) 162 { 163 addElementToRegistry(element); 164 return(this); 165 } 166 167 171 public li addElement(String element) 172 { 173 addElementToRegistry(element); 174 return(this); 175 } 176 180 public li removeElement(String hashcode) 181 { 182 removeElementFromRegistry(hashcode); 183 return(this); 184 } 185 191 public void setOnClick(String script) 192 { 193 addAttribute ( "onclick", script ); 194 } 195 201 public void setOnDblClick(String script) 202 { 203 addAttribute ( "ondblclick", script ); 204 } 205 211 public void setOnMouseDown(String script) 212 { 213 addAttribute ( "onmousedown", script ); 214 } 215 221 public void setOnMouseUp(String script) 222 { 223 addAttribute ( "onmouseup", script ); 224 } 225 231 public void setOnMouseOver(String script) 232 { 233 addAttribute ( "onmouseover", script ); 234 } 235 241 public void setOnMouseMove(String script) 242 { 243 addAttribute ( "onmousemove", script ); 244 } 245 251 public void setOnMouseOut(String script) 252 { 253 addAttribute ( "onmouseout", script ); 254 } 255 256 262 public void setOnKeyPress(String script) 263 { 264 addAttribute ( "onkeypress", script ); 265 } 266 267 273 public void setOnKeyDown(String script) 274 { 275 addAttribute ( "onkeydown", script ); 276 } 277 278 284 public void setOnKeyUp(String script) 285 { 286 addAttribute ( "onkeyup", script ); 287 } 288 } 289 | Popular Tags |