1 28 package net.sf.jasperreports.engine.fill; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.engine.JRAnchor; 33 import net.sf.jasperreports.engine.JRBox; 34 import net.sf.jasperreports.engine.JRConstants; 35 import net.sf.jasperreports.engine.JRFont; 36 import net.sf.jasperreports.engine.JRPrintHyperlinkParameters; 37 import net.sf.jasperreports.engine.JRPrintText; 38 import net.sf.jasperreports.engine.JRReportFont; 39 40 41 45 public class JRTemplatePrintText extends JRTemplatePrintElement implements JRPrintText 46 { 47 48 49 52 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 53 54 57 private String text = ""; 58 private float lineSpacingFactor = 0; 59 private float leadingOffset = 0; 60 private byte runDirection = RUN_DIRECTION_LTR; 61 private float textHeight = 0; 62 private String anchorName = null; 63 private String hyperlinkReference = null; 64 private String hyperlinkAnchor = null; 65 private Integer hyperlinkPage = null; 66 private String hyperlinkTooltip; 67 private JRPrintHyperlinkParameters hyperlinkParameters; 68 69 73 protected int bookmarkLevel = JRAnchor.NO_BOOKMARK; 74 75 78 public JRTemplatePrintText(JRTemplateText text) 79 { 80 super(text); 81 } 82 83 86 public String getText() 87 { 88 return text; 89 } 90 91 94 public void setText(String text) 95 { 96 this.text = text; 97 } 98 99 102 public float getLineSpacingFactor() 103 { 104 return lineSpacingFactor; 105 } 106 107 110 public void setLineSpacingFactor(float lineSpacingFactor) 111 { 112 this.lineSpacingFactor = lineSpacingFactor; 113 } 114 115 118 public float getLeadingOffset() 119 { 120 return leadingOffset; 121 } 122 123 126 public void setLeadingOffset(float leadingOffset) 127 { 128 this.leadingOffset = leadingOffset; 129 } 130 131 134 public byte getTextAlignment() 135 { 136 return getHorizontalAlignment(); 137 } 138 139 142 public void setTextAlignment(byte horizontalAlignment) 143 { 144 } 145 146 149 public byte getHorizontalAlignment() 150 { 151 return ((JRTemplateText)template).getHorizontalAlignment(); 152 } 153 154 public Byte getOwnHorizontalAlignment() 155 { 156 return ((JRTemplateText)template).getOwnHorizontalAlignment(); 157 } 158 159 162 public void setHorizontalAlignment(byte horizontalAlignment) 163 { 164 } 165 166 169 public void setHorizontalAlignment(Byte horizontalAlignment) 170 { 171 } 172 173 176 public byte getVerticalAlignment() 177 { 178 return ((JRTemplateText)template).getVerticalAlignment(); 179 } 180 181 184 public Byte getOwnVerticalAlignment() 185 { 186 return ((JRTemplateText)template).getOwnVerticalAlignment(); 187 } 188 189 192 public void setVerticalAlignment(byte verticalAlignment) 193 { 194 } 195 196 199 public void setVerticalAlignment(Byte verticalAlignment) 200 { 201 } 202 203 206 public byte getRotation() 207 { 208 return ((JRTemplateText)template).getRotation(); 209 } 210 211 public Byte getOwnRotation() 212 { 213 return ((JRTemplateText)template).getOwnRotation(); 214 } 215 216 219 public void setRotation(byte rotation) 220 { 221 } 222 223 226 public void setRotation(Byte rotation) 227 { 228 } 229 230 233 public byte getRunDirection() 234 { 235 return runDirection; 236 } 237 238 241 public void setRunDirection(byte runDirection) 242 { 243 this.runDirection = runDirection; 244 } 245 246 249 public float getTextHeight() 250 { 251 return textHeight; 252 } 253 254 257 public void setTextHeight(float textHeight) 258 { 259 this.textHeight = textHeight; 260 } 261 262 265 public byte getLineSpacing() 266 { 267 return ((JRTemplateText)template).getLineSpacing(); 268 } 269 270 public Byte getOwnLineSpacing() 271 { 272 return ((JRTemplateText)template).getOwnLineSpacing(); 273 } 274 275 278 public void setLineSpacing(byte lineSpacing) 279 { 280 } 281 282 285 public void setLineSpacing(Byte lineSpacing) 286 { 287 } 288 289 292 public boolean isStyledText() 293 { 294 return ((JRTemplateText)template).isStyledText(); 295 } 296 297 public Boolean isOwnStyledText() 298 { 299 return ((JRTemplateText)template).isOwnStyledText(); 300 } 301 302 305 public void setStyledText(boolean isStyledText) 306 { 307 } 308 309 312 public void setStyledText(Boolean isStyledText) 313 { 314 } 315 316 319 public JRBox getBox() 320 { 321 return (JRTemplateText)template; 322 } 323 324 327 public void setBox(JRBox box) 328 { 329 } 330 331 334 public JRFont getFont() 335 { 336 return (JRTemplateText)template; 337 } 338 339 342 public void setFont(JRFont font) 343 { 344 } 345 346 349 public String getAnchorName() 350 { 351 return anchorName; 352 } 353 354 357 public void setAnchorName(String anchorName) 358 { 359 this.anchorName = anchorName; 360 } 361 362 365 public byte getHyperlinkType() 366 { 367 return ((JRTemplateText)template).getHyperlinkType(); 368 } 369 370 373 public void setHyperlinkType(byte hyperlinkType) 374 { 375 } 376 377 380 public byte getHyperlinkTarget() 381 { 382 return ((JRTemplateText)template).getHyperlinkTarget(); 383 } 384 385 388 public void setHyperlinkTarget(byte hyperlinkTarget) 389 { 390 } 391 392 395 public String getHyperlinkReference() 396 { 397 return hyperlinkReference; 398 } 399 400 403 public void setHyperlinkReference(String hyperlinkReference) 404 { 405 this.hyperlinkReference = hyperlinkReference; 406 } 407 408 411 public String getHyperlinkAnchor() 412 { 413 return hyperlinkAnchor; 414 } 415 416 419 public void setHyperlinkAnchor(String hyperlinkAnchor) 420 { 421 this.hyperlinkAnchor = hyperlinkAnchor; 422 } 423 424 427 public Integer getHyperlinkPage() 428 { 429 return hyperlinkPage; 430 } 431 432 435 public void setHyperlinkPage(Integer hyperlinkPage) 436 { 437 this.hyperlinkPage = hyperlinkPage; 438 } 439 440 441 public int getBookmarkLevel() 442 { 443 return bookmarkLevel; 444 } 445 446 447 public void setBookmarkLevel(int bookmarkLevel) 448 { 449 this.bookmarkLevel = bookmarkLevel; 450 } 451 452 455 public byte getBorder() 456 { 457 return ((JRTemplateText)template).getBorder(); 458 } 459 460 public Byte getOwnBorder() 461 { 462 return ((JRTemplateText)template).getOwnBorder(); 463 } 464 465 468 public void setBorder(byte border) 469 { 470 } 471 472 475 public Color getBorderColor() 476 { 477 return ((JRTemplateText)template).getBorderColor(); 478 } 479 480 public Color getOwnBorderColor() 481 { 482 return ((JRTemplateText)template).getOwnBorderColor(); 483 } 484 485 488 public void setBorderColor(Color borderColor) 489 { 490 } 491 492 495 public int getPadding() 496 { 497 return ((JRTemplateText)template).getPadding(); 498 } 499 500 public Integer getOwnPadding() 501 { 502 return ((JRTemplateText)template).getOwnPadding(); 503 } 504 505 508 public void setPadding(int padding) 509 { 510 } 511 512 515 public byte getTopBorder() 516 { 517 return ((JRTemplateText)template).getTopBorder(); 518 } 519 520 523 public Byte getOwnTopBorder() 524 { 525 return ((JRTemplateText)template).getOwnTopBorder(); 526 } 527 528 531 public void setTopBorder(byte topBorder) 532 { 533 } 534 535 538 public Color getTopBorderColor() 539 { 540 return ((JRTemplateText)template).getTopBorderColor(); 541 } 542 543 546 public Color getOwnTopBorderColor() 547 { 548 return ((JRTemplateText)template).getOwnTopBorderColor(); 549 } 550 551 554 public void setTopBorderColor(Color topBorderColor) 555 { 556 } 557 558 561 public int getTopPadding() 562 { 563 return ((JRTemplateText)template).getTopPadding(); 564 } 565 566 569 public Integer getOwnTopPadding() 570 { 571 return ((JRTemplateText)template).getOwnTopPadding(); 572 } 573 574 577 public void setTopPadding(int topPadding) 578 { 579 } 580 581 584 public byte getLeftBorder() 585 { 586 return ((JRTemplateText)template).getLeftBorder(); 587 } 588 589 592 public Byte getOwnLeftBorder() 593 { 594 return ((JRTemplateText)template).getOwnLeftBorder(); 595 } 596 597 600 public void setLeftBorder(byte leftBorder) 601 { 602 } 603 604 607 public Color getLeftBorderColor() 608 { 609 return ((JRTemplateText)template).getLeftBorderColor(); 610 } 611 612 615 public Color getOwnLeftBorderColor() 616 { 617 return ((JRTemplateText)template).getOwnLeftBorderColor(); 618 } 619 620 623 public void setLeftBorderColor(Color leftBorderColor) 624 { 625 } 626 627 630 public int getLeftPadding() 631 { 632 return ((JRTemplateText)template).getLeftPadding(); 633 } 634 635 638 public Integer getOwnLeftPadding() 639 { 640 return ((JRTemplateText)template).getOwnLeftPadding(); 641 } 642 643 646 public void setLeftPadding(int leftPadding) 647 { 648 } 649 650 653 public byte getBottomBorder() 654 { 655 return ((JRTemplateText)template).getBottomBorder(); 656 } 657 658 661 public Byte getOwnBottomBorder() 662 { 663 return ((JRTemplateText)template).getOwnBottomBorder(); 664 } 665 666 669 public void setBottomBorder(byte bottomBorder) 670 { 671 } 672 673 676 public Color getBottomBorderColor() 677 { 678 return ((JRTemplateText)template).getBottomBorderColor(); 679 } 680 681 684 public Color getOwnBottomBorderColor() 685 { 686 return ((JRTemplateText)template).getOwnBottomBorderColor(); 687 } 688 689 692 public void setBottomBorderColor(Color bottomBorderColor) 693 { 694 } 695 696 699 public int getBottomPadding() 700 { 701 return ((JRTemplateText)template).getBottomPadding(); 702 } 703 704 707 public Integer getOwnBottomPadding() 708 { 709 return ((JRTemplateText)template).getOwnBottomPadding(); 710 } 711 712 715 public void setBottomPadding(int bottomPadding) 716 { 717 } 718 719 722 public byte getRightBorder() 723 { 724 return ((JRTemplateText)template).getRightBorder(); 725 } 726 727 730 public Byte getOwnRightBorder() 731 { 732 return ((JRTemplateText)template).getOwnRightBorder(); 733 } 734 735 738 public void setRightBorder(byte rightBorder) 739 { 740 } 741 742 745 public Color getRightBorderColor() 746 { 747 return ((JRTemplateText)template).getRightBorderColor(); 748 } 749 750 753 public Color getOwnRightBorderColor() 754 { 755 return ((JRTemplateText)template).getOwnRightBorderColor(); 756 } 757 758 761 public void setRightBorderColor(Color rightBorderColor) 762 { 763 } 764 765 768 public int getRightPadding() 769 { 770 return ((JRTemplateText)template).getRightPadding(); 771 } 772 773 776 public Integer getOwnRightPadding() 777 { 778 return ((JRTemplateText)template).getOwnRightPadding(); 779 } 780 781 784 public void setRightPadding(int rightPadding) 785 { 786 } 787 788 791 public JRReportFont getReportFont() 792 { 793 return ((JRTemplateText)template).getReportFont(); 794 } 795 796 799 public void setReportFont(JRReportFont reportFont) 800 { 801 } 802 803 806 public String getFontName() 807 { 808 return ((JRTemplateText)template).getFontName(); 809 } 810 811 814 public String getOwnFontName() 815 { 816 return ((JRTemplateText)template).getOwnFontName(); 817 } 818 819 822 public void setFontName(String fontName) 823 { 824 } 825 826 827 830 public boolean isBold() 831 { 832 return ((JRTemplateText)template).isBold(); 833 } 834 835 838 public Boolean isOwnBold() 839 { 840 return ((JRTemplateText)template).isOwnBold(); 841 } 842 843 846 public void setBold(boolean isBold) 847 { 848 } 849 850 854 public void setBold(Boolean isBold) 855 { 856 } 857 858 859 862 public boolean isItalic() 863 { 864 return ((JRTemplateText)template).isItalic(); 865 } 866 867 870 public Boolean isOwnItalic() 871 { 872 return ((JRTemplateText)template).isOwnItalic(); 873 } 874 875 878 public void setItalic(boolean isItalic) 879 { 880 } 881 882 886 public void setItalic(Boolean isItalic) 887 { 888 } 889 890 893 public boolean isUnderline() 894 { 895 return ((JRTemplateText)template).isUnderline(); 896 } 897 898 901 public Boolean isOwnUnderline() 902 { 903 return ((JRTemplateText)template).isOwnUnderline(); 904 } 905 906 909 public void setUnderline(boolean isUnderline) 910 { 911 } 912 913 917 public void setUnderline(Boolean isUnderline) 918 { 919 } 920 921 924 public boolean isStrikeThrough() 925 { 926 return ((JRTemplateText)template).isStrikeThrough(); 927 } 928 929 932 public Boolean isOwnStrikeThrough() 933 { 934 return ((JRTemplateText)template).isOwnStrikeThrough(); 935 } 936 937 940 public void setStrikeThrough(boolean isStrikeThrough) 941 { 942 setStrikeThrough(isStrikeThrough ? Boolean.TRUE : Boolean.FALSE); 943 } 944 945 949 public void setStrikeThrough(Boolean isStrikeThrough) 950 { 951 } 952 953 956 public int getFontSize() 957 { 958 return ((JRTemplateText)template).getFontSize(); 959 } 960 961 964 public Integer getOwnFontSize() 965 { 966 return ((JRTemplateText)template).getOwnFontSize(); 967 } 968 969 972 public void setFontSize(int fontSize) 973 { 974 } 975 976 980 public void setFontSize(Integer fontSize) 981 { 982 } 983 984 987 public int getSize() 988 { 989 return getFontSize(); 990 } 991 992 995 public Integer getOwnSize() 996 { 997 return getOwnFontSize(); 998 } 999 1000 1003 public void setSize(int size) 1004 { 1005 } 1006 1007 1010 public void setSize(Integer size) 1011 { 1012 } 1013 1014 1017 public String getPdfFontName() 1018 { 1019 return ((JRTemplateText)template).getPdfFontName(); 1020 } 1021 1022 1025 public String getOwnPdfFontName() 1026 { 1027 return ((JRTemplateText)template).getOwnPdfFontName(); 1028 } 1029 1030 1033 public void setPdfFontName(String pdfFontName) 1034 { 1035 } 1036 1037 1038 1041 public String getPdfEncoding() 1042 { 1043 return ((JRTemplateText)template).getPdfEncoding(); 1044 } 1045 1046 1049 public String getOwnPdfEncoding() 1050 { 1051 return ((JRTemplateText)template).getOwnPdfEncoding(); 1052 } 1053 1054 1057 public void setPdfEncoding(String pdfEncoding) 1058 { 1059 } 1060 1061 1062 1065 public boolean isPdfEmbedded() 1066 { 1067 return ((JRTemplateText)template).isPdfEmbedded(); 1068 } 1069 1070 1073 public Boolean isOwnPdfEmbedded() 1074 { 1075 return ((JRTemplateText)template).isOwnPdfEmbedded(); 1076 } 1077 1078 1081 public void setPdfEmbedded(boolean isPdfEmbedded) 1082 { 1083 } 1084 1085 1089 public void setPdfEmbedded(Boolean isPdfEmbedded) 1090 { 1091 } 1092 1093 1096 public void setBorder(Byte border) 1097 { 1098 } 1099 1100 1103 public void setPadding(Integer padding) 1104 { 1105 } 1106 1107 1110 public void setTopBorder(Byte topBorder) 1111 { 1112 } 1113 1114 1117 public void setTopPadding(Integer topPadding) 1118 { 1119 } 1120 1121 1124 public void setLeftBorder(Byte leftBorder) 1125 { 1126 } 1127 1128 1131 public void setLeftPadding(Integer leftPadding) 1132 { 1133 } 1134 1135 1138 public void setBottomBorder(Byte bottomBorder) 1139 { 1140 } 1141 1142 1145 public void setBottomPadding(Integer bottomPadding) 1146 { 1147 } 1148 1149 1152 public void setRightBorder(Byte rightBorder) 1153 { 1154 } 1155 1156 1159 public void setRightPadding(Integer rightPadding) 1160 { 1161 } 1162 1163 public String getValueClassName() 1164 { 1165 return ((JRTemplateText) template).getValueClassName(); 1166 } 1167 1168 public String getPattern() 1169 { 1170 return ((JRTemplateText) template).getPattern(); 1171 } 1172 1173 public String getFormatFactoryClass() 1174 { 1175 return ((JRTemplateText) template).getFormatFactoryClass(); 1176 } 1177 1178 public String getLocaleCode() 1179 { 1180 return ((JRTemplateText) template).getLocaleCode(); 1181 } 1182 1183 public String getTimeZoneId() 1184 { 1185 return ((JRTemplateText) template).getTimeZoneId(); 1186 } 1187 1188 1189 public JRPrintHyperlinkParameters getHyperlinkParameters() 1190 { 1191 return hyperlinkParameters; 1192 } 1193 1194 1195 public void setHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters) 1196 { 1197 this.hyperlinkParameters = hyperlinkParameters; 1198 } 1199 1200 public String getLinkType() 1201 { 1202 return ((JRTemplateText) template).getLinkType(); 1203 } 1204 1205 public void setLinkType(String type) 1206 { 1207 } 1208 1209 1210 public String getHyperlinkTooltip() 1211 { 1212 return hyperlinkTooltip; 1213 } 1214 1215 1216 public void setHyperlinkTooltip(String hyperlinkTooltip) 1217 { 1218 this.hyperlinkTooltip = hyperlinkTooltip; 1219 } 1220 1221} 1222 | Popular Tags |