1 21 24 package org.lobobrowser.html.style; 25 26 import java.util.*; 27 28 import org.w3c.dom.DOMException ; 29 import org.w3c.dom.css.CSS2Properties; 30 import org.w3c.dom.css.CSSStyleDeclaration; 31 32 public class CSS2PropertiesImpl implements CSS2Properties { 33 private final CSS2PropertiesContext context; 34 private Object styleDeclarations = null; 35 private CSS2PropertiesImpl localStyleProperties; 36 private Map valueMap = null; 37 38 public CSS2PropertiesImpl(CSS2PropertiesContext context) { 39 this.context = context; 40 } 41 42 public void addStyleDeclaration(CSSStyleDeclaration styleDeclaration) { 43 synchronized(this) { 44 Object sd = this.styleDeclarations; 45 if(sd == null) { 46 this.styleDeclarations = styleDeclaration; 47 } 48 else if(sd instanceof Collection) { 49 ((Collection) sd).add(styleDeclaration); 50 } 51 else { 52 Collection sdc = new ArrayList(); 54 sdc.add(sd); 55 sdc.add(styleDeclaration); 56 this.styleDeclarations = sdc; 57 } 58 } 59 } 60 61 public void setLocalStyleProperties(CSS2PropertiesImpl properties) { 62 if(properties == this) { 63 throw new IllegalStateException ("setting same"); 64 } 65 synchronized(this) { 66 this.localStyleProperties = properties; 67 } 68 } 69 70 public CSS2PropertiesImpl getLocalStyleProperties() { 71 synchronized(this) { 72 return this.localStyleProperties; 73 } 74 } 75 76 private final String getPropertyValue(String name) { 77 String lowerCase = name.toLowerCase(); 78 return this.getPropertyValueLC(lowerCase); 79 } 80 81 private final String getPropertyValueLC(String lowerCaseName) { 82 Map vm = this.valueMap; 83 synchronized(this) { 84 CSS2PropertiesImpl localProps = this.localStyleProperties; 86 if(localProps != null) { 87 String value = localProps.getPropertyValueLC(lowerCaseName); 88 if(value != null) { 89 return value; 90 } 91 } 92 if(vm != null) { 93 if(vm.containsKey(lowerCaseName)) { 94 return (String ) vm.get(lowerCaseName); 95 } 96 } 97 else { 98 vm = new HashMap(1); 99 this.valueMap = vm; 100 } 101 String declaredValue = this.getDeclaredPropertyValueImpl(lowerCaseName); 102 vm.put(lowerCaseName, declaredValue); 103 return declaredValue; 104 } 105 } 106 107 private final void setPropertyValueLC(String lowerCaseName, String value) { 108 Map vm = this.valueMap; 109 synchronized(this) { 110 if(vm == null) { 111 vm = new HashMap(1); 112 this.valueMap = vm; 113 } 114 vm.put(lowerCaseName, value); 115 } 116 } 117 118 123 private final String getDeclaredPropertyValueImpl(String lowerCaseName) { 124 String resultValue; 126 Object sd = this.styleDeclarations; 127 if(sd instanceof CSSStyleDeclaration) { 128 resultValue = ((CSSStyleDeclaration) sd).getPropertyValue(lowerCaseName); 129 if(resultValue != null && resultValue.length() == 0) { 130 resultValue = null; 131 } 132 } 133 else if(sd instanceof ArrayList) { 134 ArrayList sds = (ArrayList) sd; 135 resultValue = null; 136 int size = sds.size(); 137 for(int i = size; --i >= 0;) { 139 Object styleObject = sds.get(i); 140 if(styleObject instanceof CSSStyleDeclaration) { 141 CSSStyleDeclaration styleDeclaration = (CSSStyleDeclaration) sds.get(i); 142 String pv = styleDeclaration.getPropertyValue(lowerCaseName); 143 if(pv != null && pv.length() != 0) { 144 resultValue = pv; 145 break; 146 } 147 } 148 } 149 } 150 else { 151 resultValue = null; 152 } 153 if(resultValue != null && "inherit".equalsIgnoreCase(resultValue)) { 154 CSS2PropertiesImpl parent = this.context.getParentStyle(); 157 if(parent != null) { 158 resultValue = parent.getPropertyValueLC(lowerCaseName); 159 } 160 } 161 return resultValue; 162 } 163 164 166 private String overlayColor; 167 168 public String getOverlayColor() { 169 return this.overlayColor; 170 } 171 172 public void setOverlayColor(String value) { 173 this.overlayColor = value; 174 this.context.informLookInvalid(); 175 } 176 177 public String getFloat() { 178 return this.getPropertyValueLC("float"); 179 } 180 181 public void setFloat(String value) { 182 this.setPropertyValueLC("float", value); 183 } 184 185 187 public String getAzimuth() { 188 return this.getPropertyValueLC("azimuth"); 189 } 190 191 public String getBackground() { 192 return this.getPropertyValueLC("background"); 193 } 194 195 public String getBackgroundAttachment() { 196 return this.getPropertyValueLC("background-attachment"); 197 } 198 199 public String getBackgroundColor() { 200 return this.getPropertyValueLC("background-color"); 201 } 202 203 public String getBackgroundImage() { 204 return this.getPropertyValueLC("background-image"); 205 } 206 207 public String getBackgroundPosition() { 208 return this.getPropertyValueLC("background-position"); 209 } 210 211 public String getBackgroundRepeat() { 212 return this.getPropertyValueLC("background-repeat"); 213 } 214 215 public String getBorder() { 216 return this.getPropertyValueLC("border"); 217 } 218 219 public String getBorderBottom() { 220 return this.getPropertyValueLC("border-bottom"); 221 } 222 223 public String getBorderBottomColor() { 224 return this.getPropertyValueLC("border-bottom-color"); 225 } 226 227 public String getBorderBottomStyle() { 228 return this.getPropertyValueLC("bottom-style"); 229 } 230 231 public String getBorderBottomWidth() { 232 return this.getPropertyValueLC("bottom-width"); 233 } 234 235 public String getBorderCollapse() { 236 return this.getPropertyValueLC("border-collapse"); 237 } 238 239 public String getBorderColor() { 240 return this.getPropertyValueLC("border-color"); 241 } 242 243 public String getBorderLeft() { 244 return this.getPropertyValueLC("border-left"); 245 } 246 247 public String getBorderLeftColor() { 248 return this.getPropertyValueLC("border-left-color"); 249 } 250 251 public String getBorderLeftStyle() { 252 return this.getPropertyValueLC("border-left-style"); 253 } 254 255 public String getBorderLeftWidth() { 256 return this.getPropertyValueLC("border-left-width"); 257 } 258 259 public String getBorderRight() { 260 return this.getPropertyValueLC(""); 261 } 262 263 public String getBorderRightColor() { 264 return this.getPropertyValueLC("border-right-color"); 265 } 266 267 public String getBorderRightStyle() { 268 return this.getPropertyValueLC("border-right-style"); 269 } 270 271 public String getBorderRightWidth() { 272 return this.getPropertyValueLC("border-right-width"); 273 } 274 275 public String getBorderSpacing() { 276 return this.getPropertyValueLC("border-spacing"); 277 } 278 279 public String getBorderStyle() { 280 return this.getPropertyValueLC("border-style"); 281 } 282 283 public String getBorderTop() { 284 return this.getPropertyValueLC("border-top"); 285 } 286 287 public String getBorderTopColor() { 288 return this.getPropertyValueLC("border-top-color"); 289 } 290 291 public String getBorderTopStyle() { 292 return this.getPropertyValueLC("border-top-style"); 293 } 294 295 public String getBorderTopWidth() { 296 return this.getPropertyValueLC("border-top-width"); 297 } 298 299 public String getBorderWidth() { 300 return this.getPropertyValueLC("border-width"); 301 } 302 303 public String getBottom() { 304 return this.getPropertyValueLC("bottom"); 305 } 306 307 public String getCaptionSide() { 308 return this.getPropertyValueLC("caption-side"); 309 } 310 311 public String getClear() { 312 return this.getPropertyValueLC("clear"); 313 } 314 315 public String getClip() { 316 return this.getPropertyValueLC("clip"); 317 } 318 319 public String getColor() { 320 321 return this.getPropertyValueLC("color"); 322 } 323 324 public String getContent() { 325 326 return this.getPropertyValueLC("content"); 327 } 328 329 public String getCounterIncrement() { 330 331 return this.getPropertyValueLC("counter-increment"); 332 } 333 334 public String getCounterReset() { 335 336 return this.getPropertyValueLC("counter-reset"); 337 } 338 339 public String getCssFloat() { 340 341 return this.getPropertyValueLC("css-float"); 342 } 343 344 public String getCue() { 345 346 return this.getPropertyValueLC("cue"); 347 } 348 349 public String getCueAfter() { 350 351 return this.getPropertyValueLC("cue-after"); 352 } 353 354 public String getCueBefore() { 355 356 return this.getPropertyValueLC("cue-before"); 357 } 358 359 public String getCursor() { 360 361 return this.getPropertyValueLC("cursor"); 362 } 363 364 public String getDirection() { 365 366 return this.getPropertyValueLC("direction"); 367 } 368 369 public String getDisplay() { 370 371 return this.getPropertyValueLC("display"); 372 } 373 374 public String getElevation() { 375 376 return this.getPropertyValueLC("elevation"); 377 } 378 379 public String getEmptyCells() { 380 381 return this.getPropertyValueLC("empty-cells"); 382 } 383 384 public String getFont() { 385 386 return this.getPropertyValueLC("font"); 387 } 388 389 public String getFontFamily() { 390 391 return this.getPropertyValueLC("font-family"); 392 } 393 394 public String getFontSize() { 395 396 return this.getPropertyValueLC("font-size"); 397 } 398 399 public String getFontSizeAdjust() { 400 401 return this.getPropertyValueLC("font-size-adjust"); 402 } 403 404 public String getFontStretch() { 405 406 return this.getPropertyValueLC("font-stretch"); 407 } 408 409 public String getFontStyle() { 410 411 return this.getPropertyValueLC("font-style"); 412 } 413 414 public String getFontVariant() { 415 416 return this.getPropertyValueLC("font-variant"); 417 } 418 419 public String getFontWeight() { 420 421 return this.getPropertyValueLC("font-weight"); 422 } 423 424 public String getHeight() { 425 426 return this.getPropertyValueLC("height"); 427 } 428 429 public String getLeft() { 430 431 return this.getPropertyValueLC("left"); 432 } 433 434 public String getLetterSpacing() { 435 436 return this.getPropertyValueLC("letter-spacing"); 437 } 438 439 public String getLineHeight() { 440 441 return this.getPropertyValueLC("line-height"); 442 } 443 444 public String getListStyle() { 445 return this.getPropertyValueLC("list-style"); 446 } 447 448 public String getListStyleImage() { 449 return this.getPropertyValueLC("list-style-image"); 450 } 451 452 public String getListStylePosition() { 453 return this.getPropertyValueLC("list-style-position"); 454 } 455 456 public String getListStyleType() { 457 return this.getPropertyValueLC("list-style-type"); 458 } 459 460 public String getMargin() { 461 462 return this.getPropertyValueLC("margin"); 463 } 464 465 public String getMarginBottom() { 466 467 return this.getPropertyValueLC("margin-bottom"); 468 } 469 470 public String getMarginLeft() { 471 472 return this.getPropertyValueLC("margin-left"); 473 } 474 475 public String getMarginRight() { 476 477 return this.getPropertyValueLC("margin-right"); 478 } 479 480 public String getMarginTop() { 481 482 return this.getPropertyValueLC("margin-top"); 483 } 484 485 public String getMarkerOffset() { 486 487 return this.getPropertyValueLC("marker-offset"); 488 } 489 490 public String getMarks() { 491 492 return this.getPropertyValueLC("marks"); 493 } 494 495 public String getMaxHeight() { 496 497 return this.getPropertyValueLC("max-height"); 498 } 499 500 public String getMaxWidth() { 501 502 return this.getPropertyValueLC("max-width"); 503 } 504 505 public String getMinHeight() { 506 507 return this.getPropertyValueLC("min-height"); 508 } 509 510 public String getMinWidth() { 511 512 return this.getPropertyValueLC("min-width"); 513 } 514 515 public String getOrphans() { 516 517 return this.getPropertyValueLC("orphans"); 518 } 519 520 public String getOutline() { 521 522 return this.getPropertyValueLC("outline"); 523 } 524 525 public String getOutlineColor() { 526 527 return this.getPropertyValueLC("outline-color"); 528 } 529 530 public String getOutlineStyle() { 531 532 return this.getPropertyValueLC("outline-style"); 533 } 534 535 public String getOutlineWidth() { 536 537 return this.getPropertyValueLC("outline-width"); 538 } 539 540 public String getOverflow() { 541 542 return this.getPropertyValueLC("overflow"); 543 } 544 545 public String getPadding() { 546 547 return this.getPropertyValueLC("padding"); 548 } 549 550 public String getPaddingBottom() { 551 552 return this.getPropertyValueLC("padding-bottom"); 553 } 554 555 public String getPaddingLeft() { 556 557 return this.getPropertyValueLC("padding-left"); 558 } 559 560 public String getPaddingRight() { 561 562 return this.getPropertyValueLC("padding-right"); 563 } 564 565 public String getPaddingTop() { 566 567 return this.getPropertyValueLC("padding-top"); 568 } 569 570 public String getPage() { 571 572 return this.getPropertyValueLC("page"); 573 } 574 575 public String getPageBreakAfter() { 576 577 return this.getPropertyValueLC("page-break-after"); 578 } 579 580 public String getPageBreakBefore() { 581 582 return this.getPropertyValueLC("page-break-before"); 583 } 584 585 public String getPageBreakInside() { 586 587 return this.getPropertyValueLC("page-break-inside"); 588 } 589 590 public String getPause() { 591 592 return this.getPropertyValueLC("pause"); 593 } 594 595 public String getPauseAfter() { 596 597 return this.getPropertyValueLC("pause-after"); 598 } 599 600 public String getPauseBefore() { 601 602 return this.getPropertyValueLC("pause-before"); 603 } 604 605 public String getPitch() { 606 607 return this.getPropertyValueLC("pitch"); 608 } 609 610 public String getPitchRange() { 611 612 return this.getPropertyValueLC("pitch-range"); 613 } 614 615 public String getPlayDuring() { 616 617 return this.getPropertyValueLC("play-during"); 618 } 619 620 public String getPosition() { 621 622 return this.getPropertyValueLC("position"); 623 } 624 625 public String getQuotes() { 626 627 return this.getPropertyValueLC("quotes"); 628 } 629 630 public String getRichness() { 631 632 return this.getPropertyValueLC("richness"); 633 } 634 635 public String getRight() { 636 637 return this.getPropertyValueLC("right"); 638 } 639 640 public String getSize() { 641 642 return this.getPropertyValueLC("size"); 643 } 644 645 public String getSpeak() { 646 647 return this.getPropertyValueLC("speak"); 648 } 649 650 public String getSpeakHeader() { 651 652 return this.getPropertyValueLC("speak-header"); 653 } 654 655 public String getSpeakNumeral() { 656 657 return this.getPropertyValueLC("speak-numeral"); 658 } 659 660 public String getSpeakPunctuation() { 661 662 return this.getPropertyValueLC("speak-punctuation"); 663 } 664 665 public String getSpeechRate() { 666 667 return this.getPropertyValueLC("speech-rate"); 668 } 669 670 public String getStress() { 671 672 return this.getPropertyValueLC("stress"); 673 } 674 675 public String getTableLayout() { 676 677 return this.getPropertyValueLC("table-layout"); 678 } 679 680 public String getTextAlign() { 681 return this.getPropertyValueLC("text-align"); 682 } 683 684 public String getTextDecoration() { 685 686 return this.getPropertyValueLC("text-decoration"); 687 } 688 689 public String getTextIndent() { 690 691 return this.getPropertyValueLC("text-indent"); 692 } 693 694 public String getTextShadow() { 695 696 return this.getPropertyValueLC("text-shadow"); 697 } 698 699 public String getTextTransform() { 700 701 return this.getPropertyValueLC("text-transform"); 702 } 703 704 public String getTop() { 705 706 return this.getPropertyValueLC("top"); 707 } 708 709 public String getUnicodeBidi() { 710 711 return this.getPropertyValueLC("unicode-bidi"); 712 } 713 714 public String getVerticalAlign() { 715 716 return this.getPropertyValueLC("vertical-align"); 717 } 718 719 public String getVisibility() { 720 721 return this.getPropertyValueLC("visibility"); 722 } 723 724 public String getVoiceFamily() { 725 726 return this.getPropertyValueLC("voice-family"); 727 } 728 729 public String getVolume() { 730 731 return this.getPropertyValueLC("volume"); 732 } 733 734 public String getWhiteSpace() { 735 736 return this.getPropertyValueLC("white-space"); 737 } 738 739 public String getWidows() { 740 741 return this.getPropertyValueLC("widows"); 742 } 743 744 public String getWidth() { 745 746 return this.getPropertyValueLC("width"); 747 } 748 749 public String getWordSpacing() { 750 751 return this.getPropertyValueLC("word-spacing"); 752 } 753 754 public String getZIndex() { 755 756 return this.getPropertyValueLC("z-index"); 757 } 758 759 public void setAzimuth(String azimuth) throws DOMException { 760 this.setPropertyValueLC("azimuth", azimuth); 761 } 762 763 public void setBackground(String background) throws DOMException { 764 this.setPropertyValueLC("background", background); 765 this.context.informLookInvalid(); 766 } 767 768 public void setBackgroundAttachment(String backgroundAttachment) throws DOMException { 769 this.setPropertyValueLC("background-attachment", backgroundAttachment); 770 this.context.informLookInvalid(); 771 } 772 773 public void setBackgroundColor(String backgroundColor) throws DOMException { 774 this.setPropertyValueLC("background-color", backgroundColor); 775 this.context.informLookInvalid(); 776 } 777 778 public void setBackgroundImage(String backgroundImage) throws DOMException { 779 this.setPropertyValueLC("background-image", backgroundImage); 780 this.context.informLookInvalid(); 781 } 782 783 public void setBackgroundPosition(String backgroundPosition) throws DOMException { 784 this.setPropertyValueLC("background-position", backgroundPosition); 785 this.context.informLookInvalid(); 786 } 787 788 public void setBackgroundRepeat(String backgroundRepeat) throws DOMException { 789 this.setPropertyValueLC("background-repeat", backgroundRepeat); 790 this.context.informLookInvalid(); 791 } 792 793 public void setBorder(String border) throws DOMException { 794 this.setPropertyValueLC("border", border); 795 this.context.informInvalid(); 796 } 797 798 public void setBorderBottom(String borderBottom) throws DOMException { 799 this.setPropertyValueLC("border-bottom", borderBottom); 800 } 801 802 public void setBorderBottomColor(String borderBottomColor) throws DOMException { 803 this.setPropertyValueLC("border-bottom-color", borderBottomColor); 804 this.context.informLookInvalid(); 805 this.context.informInvalid(); 806 } 807 808 public void setBorderBottomStyle(String borderBottomStyle) throws DOMException { 809 this.setPropertyValueLC("border-bottom-style", borderBottomStyle); 810 this.context.informLookInvalid(); 811 } 812 813 public void setBorderBottomWidth(String borderBottomWidth) throws DOMException { 814 this.setPropertyValueLC("border-bottom-width", borderBottomWidth); 815 this.context.informInvalid(); 816 } 817 818 public void setBorderCollapse(String borderCollapse) throws DOMException { 819 this.setPropertyValueLC("border-collapse", borderCollapse); 820 this.context.informInvalid(); 821 } 822 823 public void setBorderColor(String borderColor) throws DOMException { 824 this.setPropertyValueLC("border-color", borderColor); 825 this.context.informLookInvalid(); 826 } 827 828 public void setBorderLeft(String borderLeft) throws DOMException { 829 this.setPropertyValueLC("border-left", borderLeft); 830 this.context.informInvalid(); 831 } 832 833 public void setBorderLeftColor(String borderLeftColor) throws DOMException { 834 this.setPropertyValueLC("border-left-color", borderLeftColor); 835 this.context.informLookInvalid(); 836 } 837 838 public void setBorderLeftStyle(String borderLeftStyle) throws DOMException { 839 this.setPropertyValueLC("border-left-style", borderLeftStyle); 840 this.context.informLookInvalid(); 841 } 842 843 public void setBorderLeftWidth(String borderLeftWidth) throws DOMException { 844 this.setPropertyValueLC("border-left-width", borderLeftWidth); 845 this.context.informInvalid(); 846 } 847 848 public void setBorderRight(String borderRight) throws DOMException { 849 this.setPropertyValueLC("border-right", borderRight); 850 this.context.informInvalid(); 851 } 852 853 public void setBorderRightColor(String borderRightColor) throws DOMException { 854 this.setPropertyValueLC("border-right-color", borderRightColor); 855 this.context.informLookInvalid(); 856 } 857 858 public void setBorderRightStyle(String borderRightStyle) throws DOMException { 859 this.setPropertyValueLC("border-right-style", borderRightStyle); 860 this.context.informLookInvalid(); 861 } 862 863 public void setBorderRightWidth(String borderRightWidth) throws DOMException { 864 this.setPropertyValueLC("border-right-width", borderRightWidth); 865 this.context.informInvalid(); 866 } 867 868 public void setBorderSpacing(String borderSpacing) throws DOMException { 869 this.setPropertyValueLC("border-spacing", borderSpacing); 870 this.context.informInvalid(); 871 } 872 873 public void setBorderStyle(String borderStyle) throws DOMException { 874 this.setPropertyValueLC("border-style", borderStyle); 875 this.context.informLookInvalid(); 876 } 877 878 public void setBorderTop(String borderTop) throws DOMException { 879 this.setPropertyValueLC("border-top", borderTop); 880 this.context.informInvalid(); 881 } 882 883 public void setBorderTopColor(String borderTopColor) throws DOMException { 884 this.setPropertyValueLC("border-top-color", borderTopColor); 885 this.context.informLookInvalid(); 886 } 887 888 public void setBorderTopStyle(String borderTopStyle) throws DOMException { 889 this.setPropertyValueLC("border-top-style", borderTopStyle); 890 this.context.informLookInvalid(); 891 } 892 893 public void setBorderTopWidth(String borderTopWidth) throws DOMException { 894 this.setPropertyValueLC("border-top-width", borderTopWidth); 895 this.context.informInvalid(); 896 } 897 898 public void setBorderWidth(String borderWidth) throws DOMException { 899 this.setPropertyValueLC("border-width", borderWidth); 900 this.context.informInvalid(); 901 } 902 903 public void setBottom(String bottom) throws DOMException { 904 this.setPropertyValueLC("bottom", bottom); 905 this.context.informPositionInvalid(); 906 } 907 908 public void setCaptionSide(String captionSide) throws DOMException { 909 this.setPropertyValueLC("captionSide", captionSide); 910 } 911 912 public void setClear(String clear) throws DOMException { 913 this.setPropertyValueLC("clear", clear); 914 this.context.informInvalid(); 915 } 916 917 public void setClip(String clip) throws DOMException { 918 this.setPropertyValueLC("clip", clip); 919 } 920 921 public void setColor(String color) throws DOMException { 922 this.setPropertyValueLC("color", color); 923 this.context.informLookInvalid(); 924 } 925 926 public void setContent(String content) throws DOMException { 927 this.setPropertyValueLC("content", content); 928 this.context.informInvalid(); 929 } 930 931 public void setCounterIncrement(String counterIncrement) throws DOMException { 932 this.setPropertyValueLC("counter-increment", counterIncrement); 933 this.context.informLookInvalid(); 934 } 935 936 public void setCounterReset(String counterReset) throws DOMException { 937 this.setPropertyValueLC("counter-reset", counterReset); 938 this.context.informLookInvalid(); 939 } 940 941 public void setCssFloat(String cssFloat) throws DOMException { 942 this.setPropertyValueLC("css-float", cssFloat); 943 this.context.informInvalid(); 944 } 945 946 public void setCue(String cue) throws DOMException { 947 this.setPropertyValueLC("cue", cue); 948 } 949 950 public void setCueAfter(String cueAfter) throws DOMException { 951 this.setPropertyValueLC("cue-after", cueAfter); 952 } 953 954 public void setCueBefore(String cueBefore) throws DOMException { 955 this.setPropertyValueLC("cue-before", cueBefore); 956 } 957 958 public void setCursor(String cursor) throws DOMException { 959 this.setPropertyValueLC("cursor", cursor); 960 this.context.informLookInvalid(); 961 } 962 963 public void setDirection(String direction) throws DOMException { 964 this.setPropertyValueLC("direction", direction); 965 this.context.informInvalid(); 966 } 967 968 public void setDisplay(String display) throws DOMException { 969 this.setPropertyValueLC("display", display); 970 this.context.informInvalid(); 971 } 972 973 public void setElevation(String elevation) throws DOMException { 974 this.setPropertyValueLC("elevation", elevation); 975 this.context.informInvalid(); 976 } 977 978 public void setEmptyCells(String emptyCells) throws DOMException { 979 this.setPropertyValueLC("empty-cells", emptyCells); 980 } 981 982 public void setFont(String font) throws DOMException { 983 this.setPropertyValueLC("font", font); 984 this.context.informInvalid(); 985 } 986 987 public void setFontFamily(String fontFamily) throws DOMException { 988 this.setPropertyValueLC("font-family", fontFamily); 989 this.context.informInvalid(); 990 } 991 992 public void setFontSize(String fontSize) throws DOMException { 993 this.setPropertyValueLC("font-size", fontSize); 994 this.context.informInvalid(); 995 } 996 997 public void setFontSizeAdjust(String fontSizeAdjust) throws DOMException { 998 this.setPropertyValueLC("font-size-adjust", fontSizeAdjust); 999 this.context.informInvalid(); 1000 } 1001 1002 public void setFontStretch(String fontStretch) throws DOMException { 1003 this.setPropertyValueLC("font-stretch", fontStretch); 1004 this.context.informInvalid(); 1005 } 1006 1007 public void setFontStyle(String fontStyle) throws DOMException { 1008 this.setPropertyValueLC("font-style", fontStyle); 1009 this.context.informInvalid(); 1010 } 1011 1012 public void setFontVariant(String fontVariant) throws DOMException { 1013 this.setPropertyValueLC("font-variant", fontVariant); 1014 this.context.informInvalid(); 1015 } 1016 1017 public void setFontWeight(String fontWeight) throws DOMException { 1018 this.setPropertyValueLC("font-weight", fontWeight); 1019 this.context.informInvalid(); 1020 } 1021 1022 public void setHeight(String height) throws DOMException { 1023 this.setPropertyValueLC("height", height); 1024 this.context.informSizeInvalid(); 1025 } 1026 1027 public void setLeft(String left) throws DOMException { 1028 this.setPropertyValueLC("left", left); 1029 this.context.informPositionInvalid(); 1030 } 1031 1032 public void setLetterSpacing(String letterSpacing) throws DOMException { 1033 this.setPropertyValueLC("letter-spacing", letterSpacing); 1034 this.context.informInvalid(); 1035 } 1036 1037 public void setLineHeight(String lineHeight) throws DOMException { 1038 this.setPropertyValueLC("line-height", lineHeight); 1039 this.context.informInvalid(); 1040 } 1041 1042 public void setListStyle(String listStyle) throws DOMException { 1043 this.setPropertyValueLC("list-style", listStyle); 1044 this.context.informInvalid(); 1045 } 1046 1047 public void setListStyleImage(String listStyleImage) throws DOMException { 1048 this.setPropertyValueLC("list-style-image", listStyleImage); 1049 this.context.informLookInvalid(); 1050 } 1051 1052 public void setListStylePosition(String listStylePosition) throws DOMException { 1053 this.setPropertyValueLC("list-style-position", listStylePosition); 1054 this.context.informInvalid(); 1055 } 1056 1057 public void setListStyleType(String listStyleType) throws DOMException { 1058 this.setPropertyValueLC("list-style-type", listStyleType); 1059 this.context.informLookInvalid(); 1060 } 1061 1062 public void setMargin(String margin) throws DOMException { 1063 this.setPropertyValueLC("margin", margin); 1064 this.context.informInvalid(); 1065 } 1066 1067 public void setMarginBottom(String marginBottom) throws DOMException { 1068 this.setPropertyValueLC("margin-bottom", marginBottom); 1069 this.context.informInvalid(); 1070 } 1071 1072 public void setMarginLeft(String marginLeft) throws DOMException { 1073 this.setPropertyValueLC("margin-left", marginLeft); 1074 this.context.informInvalid(); 1075 } 1076 1077 public void setMarginRight(String marginRight) throws DOMException { 1078 this.setPropertyValueLC("margin-right", marginRight); 1079 this.context.informInvalid(); 1080 } 1081 1082 public void setMarginTop(String marginTop) throws DOMException { 1083 this.setPropertyValueLC("margin-top", marginTop); 1084 this.context.informInvalid(); 1085 } 1086 1087 public void setMarkerOffset(String markerOffset) throws DOMException { 1088 this.setPropertyValueLC("marker-offset", markerOffset); 1089 } 1090 1091 public void setMarks(String marks) throws DOMException { 1092 this.setPropertyValueLC("marks", marks); 1093 } 1094 1095 public void setMaxHeight(String maxHeight) throws DOMException { 1096 this.setPropertyValueLC("max-height", maxHeight); 1097 this.context.informSizeInvalid(); 1098 } 1099 1100 public void setMaxWidth(String maxWidth) throws DOMException { 1101 this.setPropertyValueLC("max-width", maxWidth); 1102 this.context.informSizeInvalid(); 1103 } 1104 1105 public void setMinHeight(String minHeight) throws DOMException { 1106 this.setPropertyValueLC("min-height", minHeight); 1107 this.context.informSizeInvalid(); 1108 } 1109 1110 public void setMinWidth(String minWidth) throws DOMException { 1111 this.setPropertyValueLC("min-width", minWidth); 1112 this.context.informSizeInvalid(); 1113 } 1114 1115 public void setOrphans(String orphans) throws DOMException { 1116 this.setPropertyValueLC("orphans", orphans); 1117 } 1118 1119 public void setOutline(String outline) throws DOMException { 1120 this.setPropertyValueLC("outline", outline); 1121 this.context.informInvalid(); 1122 } 1123 1124 public void setOutlineColor(String outlineColor) throws DOMException { 1125 this.setPropertyValueLC("outline-color", outlineColor); 1126 this.context.informLookInvalid(); 1127 } 1128 1129 public void setOutlineStyle(String outlineStyle) throws DOMException { 1130 this.setPropertyValueLC("outline-style", outlineStyle); 1131 this.context.informLookInvalid(); 1132 } 1133 1134 public void setOutlineWidth(String outlineWidth) throws DOMException { 1135 this.setPropertyValueLC("outline-width", outlineWidth); 1136 this.context.informInvalid(); 1137 } 1138 1139 public void setOverflow(String overflow) throws DOMException { 1140 this.setPropertyValueLC("overflow", overflow); 1141 this.context.informInvalid(); 1142 } 1143 1144 public void setPadding(String padding) throws DOMException { 1145 this.setPropertyValueLC("padding", padding); 1146 this.context.informInvalid(); 1147 } 1148 1149 public void setPaddingBottom(String paddingBottom) throws DOMException { 1150 this.setPropertyValueLC("padding-bottom", paddingBottom); 1151 this.context.informInvalid(); 1152 } 1153 1154 public void setPaddingLeft(String paddingLeft) throws DOMException { 1155 this.setPropertyValueLC("padding-left", paddingLeft); 1156 this.context.informInvalid(); 1157 } 1158 1159 public void setPaddingRight(String paddingRight) throws DOMException { 1160 this.setPropertyValueLC("padding-right", paddingRight); 1161 this.context.informInvalid(); 1162 } 1163 1164 public void setPaddingTop(String paddingTop) throws DOMException { 1165 this.setPropertyValueLC("padding-top", paddingTop); 1166 this.context.informInvalid(); 1167 } 1168 1169 public void setPage(String page) throws DOMException { 1170 this.setPropertyValueLC("page", page); 1171 } 1172 1173 public void setPageBreakAfter(String pageBreakAfter) throws DOMException { 1174 this.setPropertyValueLC("page-break-after", pageBreakAfter); 1175 this.context.informInvalid(); 1176 } 1177 1178 public void setPageBreakBefore(String pageBreakBefore) throws DOMException { 1179 this.setPropertyValueLC("page-break-before", pageBreakBefore); 1180 this.context.informInvalid(); 1181 } 1182 1183 public void setPageBreakInside(String pageBreakInside) throws DOMException { 1184 this.setPropertyValueLC("page-break-inside", pageBreakInside); 1185 this.context.informInvalid(); 1186 } 1187 1188 public void setPause(String pause) throws DOMException { 1189 this.setPropertyValueLC("pause", pause); 1190 } 1191 1192 public void setPauseAfter(String pauseAfter) throws DOMException { 1193 this.setPropertyValueLC("pause-after", pauseAfter); 1194 } 1195 1196 public void setPauseBefore(String pauseBefore) throws DOMException { 1197 this.setPropertyValueLC("pause-before", pauseBefore); 1198 } 1199 1200 public void setPitch(String pitch) throws DOMException { 1201 this.setPropertyValueLC("pitch", pitch); 1202 } 1203 1204 public void setPitchRange(String pitchRange) throws DOMException { 1205 this.setPropertyValueLC("pitch-range", pitchRange); 1206 } 1207 1208 public void setPlayDuring(String playDuring) throws DOMException { 1209 this.setPropertyValueLC("play-during", playDuring); 1210 } 1211 1212 public void setPosition(String position) throws DOMException { 1213 this.setPropertyValueLC("position", position); 1214 this.context.informPositionInvalid(); 1215 } 1216 1217 public void setQuotes(String quotes) throws DOMException { 1218 this.setPropertyValueLC("qutes", quotes); 1219 } 1220 1221 public void setRichness(String richness) throws DOMException { 1222 this.setPropertyValueLC("richness", richness); 1223 } 1224 1225 public void setRight(String right) throws DOMException { 1226 this.setPropertyValueLC("right", right); 1227 this.context.informPositionInvalid(); 1228 } 1229 1230 public void setSize(String size) throws DOMException { 1231 this.setPropertyValueLC("size", size); 1232 this.context.informInvalid(); 1233 } 1234 1235 public void setSpeak(String speak) throws DOMException { 1236 this.setPropertyValueLC("speak", speak); 1237 } 1238 1239 public void setSpeakHeader(String speakHeader) throws DOMException { 1240 this.setPropertyValueLC("speak-header", speakHeader); 1241 } 1242 1243 public void setSpeakNumeral(String speakNumeral) throws DOMException { 1244 this.setPropertyValueLC("speak-numeral", speakNumeral); 1245 } 1246 1247 public void setSpeakPunctuation(String speakPunctuation) throws DOMException { 1248 this.setPropertyValueLC("speak-punctuation", speakPunctuation); 1249 } 1250 1251 public void setSpeechRate(String speechRate) throws DOMException { 1252 this.setPropertyValueLC("speech-rate", speechRate); 1253 } 1254 1255 public void setStress(String stress) throws DOMException { 1256 this.setPropertyValueLC("stress", stress); 1257 } 1258 1259 public void setTableLayout(String tableLayout) throws DOMException { 1260 this.setPropertyValueLC("table-layout", tableLayout); 1261 this.context.informInvalid(); 1262 } 1263 1264 public void setTextAlign(String textAlign) throws DOMException { 1265 this.setPropertyValueLC("text-align", textAlign); 1266 this.context.informLayoutInvalid(); 1267 } 1268 1269 public void setTextDecoration(String textDecoration) throws DOMException { 1270 this.setPropertyValueLC("text-decoration", textDecoration); 1271 this.context.informLookInvalid(); 1272 } 1273 1274 public void setTextIndent(String textIndent) throws DOMException { 1275 this.setPropertyValueLC("text-indent", textIndent); 1276 this.context.informLayoutInvalid(); 1277 } 1278 1279 public void setTextShadow(String textShadow) throws DOMException { 1280 this.setPropertyValueLC("text-shadow", textShadow); 1281 this.context.informLookInvalid(); 1282 } 1283 1284 public void setTextTransform(String textTransform) throws DOMException { 1285 this.setPropertyValueLC("text-transform", textTransform); 1286 this.context.informInvalid(); 1287 } 1288 1289 public void setTop(String top) throws DOMException { 1290 this.setPropertyValueLC("top", top); 1291 this.context.informPositionInvalid(); 1292 } 1293 1294 public void setUnicodeBidi(String unicodeBidi) throws DOMException { 1295 this.setPropertyValueLC("unicode-bidi", unicodeBidi); 1296 this.context.informInvalid(); 1297 } 1298 1299 public void setVerticalAlign(String verticalAlign) throws DOMException { 1300 this.setPropertyValueLC("vertical-align", verticalAlign); 1301 this.context.informInvalid(); 1302 } 1303 1304 public void setVisibility(String visibility) throws DOMException { 1305 this.setPropertyValueLC("visibility", visibility); 1306 } 1307 1308 public void setVoiceFamily(String voiceFamily) throws DOMException { 1309 this.setPropertyValueLC("voice-family", voiceFamily); 1310 } 1311 1312 public void setVolume(String volume) throws DOMException { 1313 this.setPropertyValueLC("volue", volume); 1314 } 1315 1316 public void setWhiteSpace(String whiteSpace) throws DOMException { 1317 this.setPropertyValueLC("white-space", whiteSpace); 1318 this.context.informInvalid(); 1319 } 1320 1321 public void setWidows(String widows) throws DOMException { 1322 this.setPropertyValueLC("widows", widows); 1323 } 1324 1325 public void setWidth(String width) throws DOMException { 1326 this.setPropertyValueLC("width", width); 1327 this.context.informSizeInvalid(); 1328 } 1329 1330 public void setWordSpacing(String wordSpacing) throws DOMException { 1331 this.setPropertyValueLC("word-spacing", wordSpacing); 1332 this.context.informInvalid(); 1333 } 1334 1335 public void setZIndex(String zIndex) throws DOMException { 1336 this.setPropertyValueLC("z-index", zIndex); 1337 this.context.informPositionInvalid(); 1338 } 1339 1340 public String toString() { 1341 return "CSS2PropertiesImpl[hash=" + this.hashCode() + ",textDecoration=" + this.getPropertyValue("text-decoration") + "]"; 1342 } 1343} 1344 | Popular Tags |