1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 74 public class p extends MultiPartElement implements Printable, MouseEvents, KeyEvents 75 { 76 79 { 80 setElementType("p"); 81 setCase(LOWERCASE); 82 setAttributeQuote(true); 83 } 84 88 public p() 89 { 90 } 91 92 98 public p(String align) 99 { 100 setAlign(align); 101 } 102 103 110 public p(String value, String align) 111 { 112 setAlign(align); 113 addElement(value); 114 } 115 116 120 public p setAlign(String align) 121 { 122 addAttribute("align",align); 123 return this; 124 } 125 126 130 public Element setLang(String lang) 131 { 132 addAttribute("lang",lang); 133 addAttribute("xml:lang",lang); 134 return this; 135 } 136 137 142 public p addElement(String hashcode,Element element) 143 { 144 addElementToRegistry(hashcode,element); 145 return(this); 146 } 147 148 153 public p addElement(String hashcode,String element) 154 { 155 addElementToRegistry(hashcode,element); 156 return(this); 157 } 158 162 public p addElement(Element element) 163 { 164 addElementToRegistry(element); 165 return(this); 166 } 167 168 172 public p addElement(String element) 173 { 174 addElementToRegistry(element); 175 return(this); 176 } 177 181 public p removeElement(String hashcode) 182 { 183 removeElementFromRegistry(hashcode); 184 return(this); 185 } 186 187 193 public void setOnClick(String script) 194 { 195 addAttribute ( "onclick", script ); 196 } 197 203 public void setOnDblClick(String script) 204 { 205 addAttribute ( "ondblclick", script ); 206 } 207 213 public void setOnMouseDown(String script) 214 { 215 addAttribute ( "onmousedown", script ); 216 } 217 223 public void setOnMouseUp(String script) 224 { 225 addAttribute ( "onmouseup", script ); 226 } 227 233 public void setOnMouseOver(String script) 234 { 235 addAttribute ( "onmouseover", script ); 236 } 237 243 public void setOnMouseMove(String script) 244 { 245 addAttribute ( "onmousemove", script ); 246 } 247 253 public void setOnMouseOut(String script) 254 { 255 addAttribute ( "onmouseout", script ); 256 } 257 258 264 public void setOnKeyPress(String script) 265 { 266 addAttribute ( "onkeypress", script ); 267 } 268 269 275 public void setOnKeyDown(String script) 276 { 277 addAttribute ( "onkeydown", script ); 278 } 279 280 286 public void setOnKeyUp(String script) 287 { 288 addAttribute ( "onkeyup", script ); 289 } 290 } 291 | Popular Tags |