1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 73 public class LI extends MultiPartElement implements Printable, MouseEvents, KeyEvents 74 { 75 78 { 79 setElementType("li"); 80 setNeedClosingTag(false); 81 } 82 83 86 public LI() 87 { 88 } 89 90 94 public LI(String value) 95 { 96 addElement(value); 97 } 98 99 103 public LI(Element element) 104 { 105 addElement(element); 106 } 107 108 113 public LI addElement(String hashcode,Element element) 114 { 115 addElementToRegistry(hashcode,element); 116 return(this); 117 } 118 119 124 public LI addElement(String hashcode,String element) 125 { 126 addElementToRegistry(hashcode,element); 127 return(this); 128 } 129 130 134 public LI[] addElement(String [] element) 135 { 136 LI[] li = new LI[element.length]; 137 for(int x = 0; x < element.length; x++) 138 { 139 li[x] = new LI(element[x]); 140 } 141 return(li); 142 } 143 144 148 public LI addElement(Element element) 149 { 150 addElementToRegistry(element); 151 return(this); 152 } 153 154 158 public LI addElement(String element) 159 { 160 addElementToRegistry(element); 161 return(this); 162 } 163 167 public LI removeElement(String hashcode) 168 { 169 removeElementFromRegistry(hashcode); 170 return(this); 171 } 172 178 public void setOnClick(String script) 179 { 180 addAttribute ( "onClick", script ); 181 } 182 188 public void setOnDblClick(String script) 189 { 190 addAttribute ( "onDblClick", script ); 191 } 192 198 public void setOnMouseDown(String script) 199 { 200 addAttribute ( "onMouseDown", script ); 201 } 202 208 public void setOnMouseUp(String script) 209 { 210 addAttribute ( "onMouseUp", script ); 211 } 212 218 public void setOnMouseOver(String script) 219 { 220 addAttribute ( "onMouseOver", script ); 221 } 222 228 public void setOnMouseMove(String script) 229 { 230 addAttribute ( "onMouseMove", script ); 231 } 232 238 public void setOnMouseOut(String script) 239 { 240 addAttribute ( "onMouseOut", script ); 241 } 242 243 249 public void setOnKeyPress(String script) 250 { 251 addAttribute ( "onKeyPress", script ); 252 } 253 254 260 public void setOnKeyDown(String script) 261 { 262 addAttribute ( "onKeyDown", script ); 263 } 264 265 271 public void setOnKeyUp(String script) 272 { 273 addAttribute ( "onKeyUp", script ); 274 } 275 } 276 | Popular Tags |