1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class object extends MultiPartElement implements Printable, MouseEvents, KeyEvents 71 { 72 75 { 76 setElementType("object"); 77 setCase(LOWERCASE); 78 setAttributeQuote(true); 79 } 80 81 85 public object() 86 { 87 } 88 89 93 public object setDeclare(boolean declare) 94 { 95 if(declare) 96 addAttribute("declare","declare"); 97 else 98 removeAttribute("declare"); 99 return(this); 100 } 101 102 106 public object setClassId(String url) 107 { 108 addAttribute("classid",url); 109 return(this); 110 } 111 112 116 public object setCodeType(String codetype) 117 { 118 addAttribute("codetype",codetype); 119 return(this); 120 } 121 122 126 public object setCodeBase(String url) 127 { 128 addAttribute("codebase",url); 129 return(this); 130 } 131 132 136 public object setData(String url) 137 { 138 addAttribute("data",url); 139 return(this); 140 } 141 142 147 public object setType(String type) 148 { 149 addAttribute("type",type); 150 return(this); 151 } 152 153 157 public object setArchive(String url) 159 { 160 addAttribute("archive",url); 161 return(this); 162 } 163 164 168 public object setStandBy(String cdata) 169 { 170 addAttribute("standby",cdata); 171 return(this); 172 } 173 174 178 public object setBorder(String border) 179 { 180 addAttribute("border",border); 181 return(this); 182 } 183 184 188 public object setBorder(int border) 189 { 190 addAttribute("border",Integer.toString(border)); 191 return(this); 192 } 193 194 198 public object setBorder(double border) 199 { 200 addAttribute("border",Double.toString(border)); 201 return(this); 202 } 203 204 208 public object setHeight(String height) 209 { 210 addAttribute("height",height); 211 return(this); 212 } 213 214 218 public object setHeight(int height) 219 { 220 addAttribute("height",Integer.toString(height)); 221 return(this); 222 } 223 224 228 public object setHeight(double height) 229 { 230 addAttribute("height",Double.toString(height)); 231 return(this); 232 } 233 234 238 public object setWidth(String width) 239 { 240 addAttribute("width",width); 241 return(this); 242 } 243 244 248 public object setWidth(int width) 249 { 250 addAttribute("width",Integer.toString(width)); 251 return(this); 252 } 253 254 258 public object setWidth(double width) 259 { 260 addAttribute("width",Double.toString(width)); 261 return(this); 262 } 263 264 268 public object setHSpace(String hspace) 269 { 270 addAttribute("hspace",hspace); 271 return(this); 272 } 273 274 278 public object setHSpace(int hspace) 279 { 280 addAttribute("hspace",Integer.toString(hspace)); 281 return(this); 282 } 283 284 288 public object setHSpace(double hspace) 289 { 290 addAttribute("hspace",Double.toString(hspace)); 291 return(this); 292 } 293 294 298 public object setVSpace(String vspace) 299 { 300 addAttribute("vspace",vspace); 301 return(this); 302 } 303 304 308 public object setVSpace(int vspace) 309 { 310 addAttribute("vspace",Integer.toString(vspace)); 311 return(this); 312 } 313 314 318 public object setVSpace(double vspace) 319 { 320 addAttribute("vspace",Double.toString(vspace)); 321 return(this); 322 } 323 324 330 public object setAlign(String alignment) 331 { 332 addAttribute("align",alignment); 333 return(this); 334 } 335 336 340 public object setUseMap(String url) 341 { 342 addAttribute("usemap",url); 343 return(this); 344 } 345 346 350 public object setShapes(boolean shape) 351 { 352 if(shape) 353 addAttribute("shapes","shapes"); 354 else 355 removeAttribute("shapes"); 356 return(this); 357 } 358 359 363 public object setName(String name) 364 { 365 addAttribute("name",name); 366 return(this); 367 } 368 369 373 public object setTabIndex(int number) 374 { 375 addAttribute("tabindex",Integer.toString(number)); 376 return(this); 377 } 378 379 383 public object setTabIndex(String number) 384 { 385 addAttribute("tabindex",number); 386 return(this); 387 } 388 389 393 public Element setLang(String lang) 394 { 395 addAttribute("lang",lang); 396 addAttribute("xml:lang",lang); 397 return this; 398 } 399 400 405 public object addElement(String hashcode,Element element) 406 { 407 addElementToRegistry(hashcode,element); 408 return(this); 409 } 410 411 416 public object addElement(String hashcode,String element) 417 { 418 addElementToRegistry(hashcode,element); 419 return(this); 420 } 421 422 426 public object addElement(String element) 427 { 428 addElementToRegistry(element); 429 return(this); 430 } 431 432 436 public object addElement(Element element) 437 { 438 addElementToRegistry(element); 439 return(this); 440 } 441 445 public object removeElement(String hashcode) 446 { 447 removeElementFromRegistry(hashcode); 448 return(this); 449 } 450 451 457 public void setOnClick(String script) 458 { 459 addAttribute ( "onclick", script ); 460 } 461 467 public void setOnDblClick(String script) 468 { 469 addAttribute ( "ondblclick", script ); 470 } 471 477 public void setOnMouseDown(String script) 478 { 479 addAttribute ( "onmousedown", script ); 480 } 481 487 public void setOnMouseUp(String script) 488 { 489 addAttribute ( "onmouseup", script ); 490 } 491 497 public void setOnMouseOver(String script) 498 { 499 addAttribute ( "onmouseover", script ); 500 } 501 507 public void setOnMouseMove(String script) 508 { 509 addAttribute ( "onmousemove", script ); 510 } 511 517 public void setOnMouseOut(String script) 518 { 519 addAttribute ( "onmouseout", script ); 520 } 521 522 528 public void setOnKeyPress(String script) 529 { 530 addAttribute ( "onkeypress", script ); 531 } 532 533 539 public void setOnKeyDown(String script) 540 { 541 addAttribute ( "onkeydown", script ); 542 } 543 544 550 public void setOnKeyUp(String script) 551 { 552 addAttribute ( "onkeyup", script ); 553 } 554 } 555 | Popular Tags |