1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 69 70 public class caption extends MultiPartElement implements Printable, MouseEvents, KeyEvents 71 { 72 75 { 76 setElementType("caption"); 77 setCase(LOWERCASE); 78 setAttributeQuote(true); 79 } 80 81 84 public caption() 85 { 86 } 87 88 92 public caption setAlign(String align) 93 { 94 addAttribute("align",align); 95 return(this); 96 } 97 98 102 public Element setLang(String lang) 103 { 104 addAttribute("lang",lang); 105 addAttribute("xml:lang",lang); 106 return this; 107 } 108 109 114 public caption addElement(String hashcode,Element element) 115 { 116 addElementToRegistry(hashcode,element); 117 return(this); 118 } 119 120 125 public caption addElement(String hashcode,String element) 126 { 127 addElementToRegistry(hashcode,element); 128 return(this); 129 } 130 134 public caption addElement(String element) 135 { 136 addElementToRegistry(Integer.toString(element.hashCode()),element); 137 return(this); 138 } 139 140 144 public caption addElement(Element element) 145 { 146 addElementToRegistry(element); 147 return(this); 148 } 149 153 public caption removeElement(String hashcode) 154 { 155 removeElementFromRegistry(hashcode); 156 return(this); 157 } 158 159 165 public void setOnClick(String script) 166 { 167 addAttribute ( "onclick", script ); 168 } 169 175 public void setOnDblClick(String script) 176 { 177 addAttribute ( "ondblclick", script ); 178 } 179 185 public void setOnMouseDown(String script) 186 { 187 addAttribute ( "onmousedown", script ); 188 } 189 195 public void setOnMouseUp(String script) 196 { 197 addAttribute ( "onmouseup", script ); 198 } 199 205 public void setOnMouseOver(String script) 206 { 207 addAttribute ( "onmouseover", script ); 208 } 209 215 public void setOnMouseMove(String script) 216 { 217 addAttribute ( "onmousemove", script ); 218 } 219 225 public void setOnMouseOut(String script) 226 { 227 addAttribute ( "onmouseout", script ); 228 } 229 230 236 public void setOnKeyPress(String script) 237 { 238 addAttribute ( "onkeypress", script ); 239 } 240 241 247 public void setOnKeyDown(String script) 248 { 249 addAttribute ( "onkeydown", script ); 250 } 251 252 258 public void setOnKeyUp(String script) 259 { 260 addAttribute ( "onkeyup", script ); 261 } 262 } 263 | Popular Tags |