KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > base > JRBaseTextElement


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * JasperSoft Corporation
24  * 303 Second Street, Suite 450 North
25  * San Francisco, CA 94107
26  * http://www.jaspersoft.com
27  */

28 package net.sf.jasperreports.engine.base;
29
30 import java.awt.Color JavaDoc;
31
32 import net.sf.jasperreports.engine.JRBox;
33 import net.sf.jasperreports.engine.JRConstants;
34 import net.sf.jasperreports.engine.JRFont;
35 import net.sf.jasperreports.engine.JRReportFont;
36 import net.sf.jasperreports.engine.JRStyle;
37 import net.sf.jasperreports.engine.JRTextElement;
38 import net.sf.jasperreports.engine.util.JRStyleResolver;
39
40
41 /**
42  * This class provides functionality common to text elements. It provides implementation for the methods described
43  * in <tt>JRTextElement</tt>.
44  * @author Teodor Danciu (teodord@users.sourceforge.net)
45  * @version $Id: JRBaseTextElement.java 1229 2006-04-19 13:27:35 +0300 (Wed, 19 Apr 2006) teodord $
46  */

47 public abstract class JRBaseTextElement extends JRBaseElement implements JRTextElement
48 {
49
50
51     /**
52      *
53      */

54     private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
55
56     /**
57      *
58      */

59     protected Byte JavaDoc horizontalAlignment;
60     protected Byte JavaDoc verticalAlignment;
61     protected Byte JavaDoc rotation;
62     protected Byte JavaDoc lineSpacing;
63     protected Boolean JavaDoc isStyledText;
64
65     /**
66      *
67      */

68     protected Byte JavaDoc border;
69     protected Byte JavaDoc topBorder = null;
70     protected Byte JavaDoc leftBorder = null;
71     protected Byte JavaDoc bottomBorder = null;
72     protected Byte JavaDoc rightBorder = null;
73     protected Color JavaDoc borderColor = null;
74     protected Color JavaDoc topBorderColor = null;
75     protected Color JavaDoc leftBorderColor = null;
76     protected Color JavaDoc bottomBorderColor = null;
77     protected Color JavaDoc rightBorderColor = null;
78     protected Integer JavaDoc padding;
79     protected Integer JavaDoc topPadding = null;
80     protected Integer JavaDoc leftPadding = null;
81     protected Integer JavaDoc bottomPadding = null;
82     protected Integer JavaDoc rightPadding = null;
83
84     protected JRReportFont reportFont = null;
85     protected String JavaDoc fontName = null;
86     protected Boolean JavaDoc isBold = null;
87     protected Boolean JavaDoc isItalic = null;
88     protected Boolean JavaDoc isUnderline = null;
89     protected Boolean JavaDoc isStrikeThrough = null;
90     protected Integer JavaDoc fontSize = null;
91     protected String JavaDoc pdfFontName = null;
92     protected String JavaDoc pdfEncoding = null;
93     protected Boolean JavaDoc isPdfEmbedded = null;
94
95     
96     /**
97      * Initializes properties that are specific to text elements. Common properties are initialized by its
98      * parent constructor.
99      * @param textElement an element whose properties are copied to this element. Usually it is a
100      * {@link net.sf.jasperreports.engine.design.JRDesignTextElement} that must be transformed into an
101      * <tt>JRBaseTextElement</tt> at compile time.
102      * @param factory a factory used in the compile process
103      */

104     protected JRBaseTextElement(JRTextElement textElement, JRBaseObjectFactory factory)
105     {
106         super(textElement, factory);
107
108         horizontalAlignment = textElement.getOwnHorizontalAlignment();
109         verticalAlignment = textElement.getOwnVerticalAlignment();
110         rotation = textElement.getOwnRotation();
111         lineSpacing = textElement.getOwnLineSpacing();
112         isStyledText = textElement.isOwnStyledText();
113
114         border = textElement.getOwnBorder();
115         topBorder = textElement.getOwnTopBorder();
116         leftBorder = textElement.getOwnLeftBorder();
117         bottomBorder = textElement.getOwnBottomBorder();
118         rightBorder = textElement.getOwnRightBorder();
119         borderColor = textElement.getOwnBorderColor();
120         topBorderColor = textElement.getOwnTopBorderColor();
121         leftBorderColor = textElement.getOwnLeftBorderColor();
122         bottomBorderColor = textElement.getOwnBottomBorderColor();
123         rightBorderColor = textElement.getOwnRightBorderColor();
124         padding = textElement.getOwnPadding();
125         topPadding = textElement.getOwnTopPadding();
126         leftPadding = textElement.getOwnLeftPadding();
127         bottomPadding = textElement.getOwnBottomPadding();
128         rightPadding = textElement.getOwnRightPadding();
129
130         reportFont = factory.getReportFont(textElement.getReportFont());
131         
132         fontName = textElement.getOwnFontName();
133         isBold = textElement.isOwnBold();
134         isItalic = textElement.isOwnItalic();
135         isUnderline = textElement.isOwnUnderline();
136         isStrikeThrough = textElement.isOwnStrikeThrough();
137         fontSize = textElement.getOwnFontSize();
138         pdfFontName = textElement.getOwnPdfFontName();
139         pdfEncoding = textElement.getOwnPdfEncoding();
140         isPdfEmbedded = textElement.isOwnPdfEmbedded();
141     }
142
143
144     /**
145      *
146      */

147     protected JRFont getBaseFont()
148     {
149         if (reportFont != null)
150             return reportFont;
151         if (defaultStyleProvider != null)
152             return defaultStyleProvider.getDefaultFont();
153         return null;
154     }
155
156
157     /**
158      * @deprecated Replaced by {@link #getHorizontalAlignment()}.
159      */

160     public byte getTextAlignment()
161     {
162         if (horizontalAlignment == null) {
163             JRStyle style = getBaseStyle();
164             if (style != null && style.getHorizontalAlignment() != null)
165                 return style.getHorizontalAlignment().byteValue();
166             return HORIZONTAL_ALIGN_LEFT;
167         }
168         return horizontalAlignment.byteValue();
169     }
170
171     /**
172      * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
173      */

174     public void setTextAlignment(byte horizontalAlignment)
175     {
176         this.horizontalAlignment = new Byte JavaDoc(horizontalAlignment);
177     }
178
179     /**
180      *
181      */

182     public byte getHorizontalAlignment()
183     {
184         return JRStyleResolver.getHorizontalAlignment(this);
185     }
186
187     public Byte JavaDoc getOwnHorizontalAlignment()
188     {
189         return horizontalAlignment;
190     }
191
192     /**
193      *
194      */

195     public void setHorizontalAlignment(byte horizontalAlignment)
196     {
197         this.horizontalAlignment = new Byte JavaDoc(horizontalAlignment);
198     }
199
200     /**
201      *
202      */

203     public void setHorizontalAlignment(Byte JavaDoc horizontalAlignment)
204     {
205         this.horizontalAlignment = horizontalAlignment;
206     }
207
208     /**
209      *
210      */

211     public byte getVerticalAlignment()
212     {
213         return JRStyleResolver.getVerticalAlignment(this);
214     }
215
216     public Byte JavaDoc getOwnVerticalAlignment()
217     {
218         return verticalAlignment;
219     }
220
221     /**
222      *
223      */

224     public void setVerticalAlignment(byte verticalAlignment)
225     {
226         this.verticalAlignment = new Byte JavaDoc(verticalAlignment);
227     }
228
229     /**
230      *
231      */

232     public void setVerticalAlignment(Byte JavaDoc verticalAlignment)
233     {
234         this.verticalAlignment = verticalAlignment;
235     }
236
237     /**
238      *
239      */

240     public byte getRotation()
241     {
242         return JRStyleResolver.getRotation(this);
243     }
244
245     public Byte JavaDoc getOwnRotation()
246     {
247         return rotation;
248     }
249
250     /**
251      *
252      */

253     public void setRotation(byte rotation)
254     {
255         this.rotation = new Byte JavaDoc(rotation);
256     }
257
258     /**
259      *
260      */

261     public void setRotation(Byte JavaDoc rotation)
262     {
263         this.rotation = rotation;
264     }
265
266     /**
267      *
268      */

269     public byte getLineSpacing()
270     {
271         return JRStyleResolver.getLineSpacing(this);
272     }
273
274     public Byte JavaDoc getOwnLineSpacing()
275     {
276         return lineSpacing;
277     }
278
279     /**
280      *
281      */

282     public void setLineSpacing(byte lineSpacing)
283     {
284         this.lineSpacing = new Byte JavaDoc(lineSpacing);
285     }
286
287     /**
288      *
289      */

290     public void setLineSpacing(Byte JavaDoc lineSpacing)
291     {
292         this.lineSpacing = lineSpacing;
293     }
294
295     /**
296      *
297      */

298     public boolean isStyledText()
299     {
300         return JRStyleResolver.isStyledText(this);
301     }
302
303     public Boolean JavaDoc isOwnStyledText()
304     {
305         return isStyledText;
306     }
307
308     /**
309      *
310      */

311     public void setStyledText(boolean isStyledText)
312     {
313         setStyledText(isStyledText ? Boolean.TRUE : Boolean.FALSE);
314     }
315
316     /**
317      *
318      */

319     public void setStyledText(Boolean JavaDoc isStyledText)
320     {
321         this.isStyledText = isStyledText;
322     }
323
324     /**
325      * @deprecated
326      */

327     public JRBox getBox()
328     {
329         return this;
330     }
331
332     /**
333      * @deprecated
334      */

335     public JRFont getFont()
336     {
337         return this;
338     }
339
340     /**
341      *
342      */

343     public byte getMode()
344     {
345         return JRStyleResolver.getMode(this, MODE_TRANSPARENT);
346     }
347
348     /**
349      *
350      */

351     public byte getBorder()
352     {
353         return JRStyleResolver.getBorder(this);
354     }
355
356     /**
357      *
358      */

359     public Byte JavaDoc getOwnBorder()
360     {
361         return border;
362     }
363
364     /**
365      *
366      */

367     public void setBorder(byte border)
368     {
369         this.border = new Byte JavaDoc(border);
370     }
371
372     /**
373      *
374      */

375     public void setBorder(Byte JavaDoc border)
376     {
377         this.border = border;
378     }
379
380     /**
381      *
382      */

383     public Color JavaDoc getBorderColor()
384     {
385         return JRStyleResolver.getBorderColor(this, getForecolor());
386     }
387
388     public Color JavaDoc getOwnBorderColor()
389     {
390         return borderColor;
391     }
392
393     /**
394      *
395      */

396     public void setBorderColor(Color JavaDoc borderColor)
397     {
398         this.borderColor = borderColor;
399     }
400
401     /**
402      *
403      */

404     public int getPadding()
405     {
406         return JRStyleResolver.getPadding(this);
407     }
408
409     public Integer JavaDoc getOwnPadding()
410     {
411         return padding;
412     }
413
414     /**
415      *
416      */

417     public void setPadding(int padding)
418     {
419         this.padding = new Integer JavaDoc(padding);
420     }
421
422     /**
423      *
424      */

425     public void setPadding(Integer JavaDoc padding)
426     {
427         this.padding = padding;
428     }
429
430     /**
431      *
432      */

433     public byte getTopBorder()
434     {
435         return JRStyleResolver.getTopBorder(this);
436     }
437
438     /**
439      *
440      */

441     public Byte JavaDoc getOwnTopBorder()
442     {
443         return topBorder;
444     }
445
446     /**
447      *
448      */

449     public void setTopBorder(byte topBorder)
450     {
451         this.topBorder = new Byte JavaDoc(topBorder);
452     }
453
454     /**
455      *
456      */

457     public void setTopBorder(Byte JavaDoc topBorder)
458     {
459         this.topBorder = topBorder;
460     }
461
462     /**
463      *
464      */

465     public Color JavaDoc getTopBorderColor()
466     {
467         return JRStyleResolver.getTopBorderColor(this, getForecolor());
468     }
469
470     /**
471      *
472      */

473     public Color JavaDoc getOwnTopBorderColor()
474     {
475         return topBorderColor;
476     }
477
478     /**
479      *
480      */

481     public void setTopBorderColor(Color JavaDoc topBorderColor)
482     {
483         this.topBorderColor = topBorderColor;
484     }
485
486     /**
487      *
488      */

489     public int getTopPadding()
490     {
491         return JRStyleResolver.getTopPadding(this);
492     }
493
494     /**
495      *
496      */

497     public Integer JavaDoc getOwnTopPadding()
498     {
499         return topPadding;
500     }
501
502     /**
503      *
504      */

505     public void setTopPadding(int topPadding)
506     {
507         this.topPadding = new Integer JavaDoc(topPadding);
508     }
509
510     /**
511      *
512      */

513     public void setTopPadding(Integer JavaDoc topPadding)
514     {
515         this.topPadding = topPadding;
516     }
517
518     /**
519      *
520      */

521     public byte getLeftBorder()
522     {
523         return JRStyleResolver.getLeftBorder(this);
524     }
525
526     /**
527      *
528      */

529     public Byte JavaDoc getOwnLeftBorder()
530     {
531         return leftBorder;
532     }
533
534     /**
535      *
536      */

537     public void setLeftBorder(byte leftBorder)
538     {
539         this.leftBorder = new Byte JavaDoc(leftBorder);
540     }
541
542     /**
543      *
544      */

545     public void setLeftBorder(Byte JavaDoc leftBorder)
546     {
547         this.leftBorder = leftBorder;
548     }
549
550     /**
551      *
552      */

553     public Color JavaDoc getLeftBorderColor()
554     {
555         return JRStyleResolver.getLeftBorderColor(this, getForecolor());
556     }
557
558     /**
559      *
560      */

561     public Color JavaDoc getOwnLeftBorderColor()
562     {
563         return leftBorderColor;
564     }
565
566     /**
567      *
568      */

569     public void setLeftBorderColor(Color JavaDoc leftBorderColor)
570     {
571         this.leftBorderColor = leftBorderColor;
572     }
573
574     /**
575      *
576      */

577     public int getLeftPadding()
578     {
579         return JRStyleResolver.getLeftPadding(this);
580     }
581
582     /**
583      *
584      */

585     public Integer JavaDoc getOwnLeftPadding()
586     {
587         return leftPadding;
588     }
589
590     /**
591      *
592      */

593     public void setLeftPadding(int leftPadding)
594     {
595         this.leftPadding = new Integer JavaDoc(leftPadding);
596     }
597
598     /**
599      *
600      */

601     public void setLeftPadding(Integer JavaDoc leftPadding)
602     {
603         this.leftPadding = leftPadding;
604     }
605
606     /**
607      *
608      */

609     public byte getBottomBorder()
610     {
611         return JRStyleResolver.getBottomBorder(this);
612     }
613
614     /**
615      *
616      */

617     public Byte JavaDoc getOwnBottomBorder()
618     {
619         return bottomBorder;
620     }
621
622     /**
623      *
624      */

625     public void setBottomBorder(byte bottomBorder)
626     {
627         this.bottomBorder = new Byte JavaDoc(bottomBorder);
628     }
629
630     /**
631      *
632      */

633     public void setBottomBorder(Byte JavaDoc bottomBorder)
634     {
635         this.bottomBorder = bottomBorder;
636     }
637
638     /**
639      *
640      */

641     public Color JavaDoc getBottomBorderColor()
642     {
643         return JRStyleResolver.getBottomBorderColor(this, getForecolor());
644     }
645
646     /**
647      *
648      */

649     public Color JavaDoc getOwnBottomBorderColor()
650     {
651         return bottomBorderColor;
652     }
653
654     /**
655      *
656      */

657     public void setBottomBorderColor(Color JavaDoc bottomBorderColor)
658     {
659         this.bottomBorderColor = bottomBorderColor;
660     }
661
662     /**
663      *
664      */

665     public int getBottomPadding()
666     {
667         return JRStyleResolver.getBottomPadding(this);
668     }
669
670     /**
671      *
672      */

673     public Integer JavaDoc getOwnBottomPadding()
674     {
675         return bottomPadding;
676     }
677
678     /**
679      *
680      */

681     public void setBottomPadding(int bottomPadding)
682     {
683         this.bottomPadding = new Integer JavaDoc(bottomPadding);
684     }
685
686     /**
687      *
688      */

689     public void setBottomPadding(Integer JavaDoc bottomPadding)
690     {
691         this.bottomPadding = bottomPadding;
692     }
693
694     /**
695      *
696      */

697     public byte getRightBorder()
698     {
699         return JRStyleResolver.getRightBorder(this);
700     }
701
702     /**
703      *
704      */

705     public Byte JavaDoc getOwnRightBorder()
706     {
707         return rightBorder;
708     }
709
710     /**
711      *
712      */

713     public void setRightBorder(byte rightBorder)
714     {
715         this.rightBorder = new Byte JavaDoc(rightBorder);
716     }
717
718     /**
719      *
720      */

721     public void setRightBorder(Byte JavaDoc rightBorder)
722     {
723         this.rightBorder = rightBorder;
724     }
725
726     /**
727      *
728      */

729     public Color JavaDoc getRightBorderColor()
730     {
731         return JRStyleResolver.getRightBorderColor(this, getForecolor());
732     }
733
734     /**
735      *
736      */

737     public Color JavaDoc getOwnRightBorderColor()
738     {
739         return rightBorderColor;
740     }
741
742     /**
743      *
744      */

745     public void setRightBorderColor(Color JavaDoc rightBorderColor)
746     {
747         this.rightBorderColor = rightBorderColor;
748     }
749
750     /**
751      *
752      */

753     public int getRightPadding()
754     {
755         return JRStyleResolver.getRightPadding(this);
756     }
757
758     /**
759      *
760      */

761     public Integer JavaDoc getOwnRightPadding()
762     {
763         return rightPadding;
764     }
765
766     /**
767      *
768      */

769     public void setRightPadding(int rightPadding)
770     {
771         this.rightPadding = new Integer JavaDoc(rightPadding);
772     }
773
774     /**
775      *
776      */

777     public void setRightPadding(Integer JavaDoc rightPadding)
778     {
779         this.rightPadding = rightPadding;
780     }
781
782     /**
783      *
784      */

785     public JRReportFont getReportFont()
786     {
787         return reportFont;
788     }
789
790     /**
791      *
792      */

793     public void setReportFont(JRReportFont reportFont)
794     {
795         this.reportFont = reportFont;
796     }
797
798     /**
799      *
800      */

801     public String JavaDoc getFontName()
802     {
803         return JRStyleResolver.getFontName(this);
804     }
805
806     /**
807      *
808      */

809     public String JavaDoc getOwnFontName()
810     {
811         return fontName;
812     }
813
814     /**
815      *
816      */

817     public void setFontName(String JavaDoc fontName)
818     {
819         this.fontName = fontName;
820     }
821
822
823     /**
824      *
825      */

826     public boolean isBold()
827     {
828         return JRStyleResolver.isBold(this);
829     }
830
831     /**
832      *
833      */

834     public Boolean JavaDoc isOwnBold()
835     {
836         return isBold;
837     }
838
839     /**
840      *
841      */

842     public void setBold(boolean isBold)
843     {
844         setBold(isBold ? Boolean.TRUE : Boolean.FALSE);
845     }
846
847     /**
848      * Alternative setBold method which allows also to reset
849      * the "own" isBold property.
850      */

851     public void setBold(Boolean JavaDoc isBold)
852     {
853         this.isBold = isBold;
854     }
855
856
857     /**
858      *
859      */

860     public boolean isItalic()
861     {
862         return JRStyleResolver.isItalic(this);
863     }
864
865     /**
866      *
867      */

868     public Boolean JavaDoc isOwnItalic()
869     {
870         return isItalic;
871     }
872
873     /**
874      *
875      */

876     public void setItalic(boolean isItalic)
877     {
878         setItalic(isItalic ? Boolean.TRUE : Boolean.FALSE);
879     }
880
881     /**
882      * Alternative setItalic method which allows also to reset
883      * the "own" isItalic property.
884      */

885     public void setItalic(Boolean JavaDoc isItalic)
886     {
887         this.isItalic = isItalic;
888     }
889
890     /**
891      *
892      */

893     public boolean isUnderline()
894     {
895         return JRStyleResolver.isUnderline(this);
896     }
897
898     /**
899      *
900      */

901     public Boolean JavaDoc isOwnUnderline()
902     {
903         return isUnderline;
904     }
905
906     /**
907      *
908      */

909     public void setUnderline(boolean isUnderline)
910     {
911         setUnderline(isUnderline ? Boolean.TRUE : Boolean.FALSE);
912     }
913
914     /**
915      * Alternative setUnderline method which allows also to reset
916      * the "own" isUnderline property.
917      */

918     public void setUnderline(Boolean JavaDoc isUnderline)
919     {
920         this.isUnderline = isUnderline;
921     }
922
923     /**
924      *
925      */

926     public boolean isStrikeThrough()
927     {
928         return JRStyleResolver.isStrikeThrough(this);
929     }
930
931     /**
932      *
933      */

934     public Boolean JavaDoc isOwnStrikeThrough()
935     {
936         return isStrikeThrough;
937     }
938
939     /**
940      *
941      */

942     public void setStrikeThrough(boolean isStrikeThrough)
943     {
944         setStrikeThrough(isStrikeThrough ? Boolean.TRUE : Boolean.FALSE);
945     }
946
947     /**
948      * Alternative setStrikeThrough method which allows also to reset
949      * the "own" isStrikeThrough property.
950      */

951     public void setStrikeThrough(Boolean JavaDoc isStrikeThrough)
952     {
953         this.isStrikeThrough = isStrikeThrough;
954     }
955
956     /**
957      *
958      */

959     public int getFontSize()
960     {
961         return JRStyleResolver.getFontSize(this);
962     }
963
964     /**
965      *
966      */

967     public Integer JavaDoc getOwnFontSize()
968     {
969         return fontSize;
970     }
971
972     /**
973      *
974      */

975     public void setFontSize(int fontSize)
976     {
977         setFontSize(new Integer JavaDoc(fontSize));
978     }
979
980     /**
981      * Alternative setSize method which allows also to reset
982      * the "own" size property.
983      */

984     public void setFontSize(Integer JavaDoc fontSize)
985     {
986         this.fontSize = fontSize;
987     }
988
989     /**
990      * @deprecated Replaced by {@link #getFontSize()}.
991      */

992     public int getSize()
993     {
994         return getFontSize();
995     }
996
997     /**
998      * @deprecated Replaced by {@link #getOwnFontSize()}.
999      */

1000    public Integer JavaDoc getOwnSize()
1001    {
1002        return getOwnFontSize();
1003    }
1004
1005    /**
1006     * @deprecated Replaced by {@link #setFontSize(int)}.
1007     */

1008    public void setSize(int size)
1009    {
1010        setFontSize(size);
1011    }
1012
1013    /**
1014     * @deprecated Replaced by {@link #setFontSize(Integer)}.
1015     */

1016    public void setSize(Integer JavaDoc size)
1017    {
1018        setFontSize(size);
1019    }
1020
1021    /**
1022     *
1023     */

1024    public String JavaDoc getPdfFontName()
1025    {
1026        return JRStyleResolver.getPdfFontName(this);
1027    }
1028
1029    /**
1030     *
1031     */

1032    public String JavaDoc getOwnPdfFontName()
1033    {
1034        return pdfFontName;
1035    }
1036
1037    /**
1038     *
1039     */

1040    public void setPdfFontName(String JavaDoc pdfFontName)
1041    {
1042        this.pdfFontName = pdfFontName;
1043    }
1044
1045
1046    /**
1047     *
1048     */

1049    public String JavaDoc getPdfEncoding()
1050    {
1051        return JRStyleResolver.getPdfEncoding(this);
1052    }
1053
1054    /**
1055     *
1056     */

1057    public String JavaDoc getOwnPdfEncoding()
1058    {
1059        return pdfEncoding;
1060    }
1061
1062    /**
1063     *
1064     */

1065    public void setPdfEncoding(String JavaDoc pdfEncoding)
1066    {
1067        this.pdfEncoding = pdfEncoding;
1068    }
1069
1070
1071    /**
1072     *
1073     */

1074    public boolean isPdfEmbedded()
1075    {
1076        return JRStyleResolver.isPdfEmbedded(this);
1077    }
1078
1079    /**
1080     *
1081     */

1082    public Boolean JavaDoc isOwnPdfEmbedded()
1083    {
1084        return isPdfEmbedded;
1085    }
1086
1087    /**
1088     *
1089     */

1090    public void setPdfEmbedded(boolean isPdfEmbedded)
1091    {
1092        setPdfEmbedded(isPdfEmbedded ? Boolean.TRUE : Boolean.FALSE);
1093    }
1094
1095    /**
1096     * Alternative setPdfEmbedded method which allows also to reset
1097     * the "own" isPdfEmbedded property.
1098     */

1099    public void setPdfEmbedded(Boolean JavaDoc isPdfEmbedded)
1100    {
1101        this.isPdfEmbedded = isPdfEmbedded;
1102    }
1103
1104
1105}
1106
Popular Tags