1
24 package net.sf.jasperreports.engine.util;
25
26 import java.awt.Color;
27
28 import net.sf.jasperreports.annotations.properties.Property;
29 import net.sf.jasperreports.annotations.properties.PropertyScope;
30 import net.sf.jasperreports.charts.JRCategoryAxisFormat;
31 import net.sf.jasperreports.charts.JRTimeAxisFormat;
32 import net.sf.jasperreports.charts.JRValueAxisFormat;
33 import net.sf.jasperreports.charts.JRXAxisFormat;
34 import net.sf.jasperreports.charts.JRYAxisFormat;
35 import net.sf.jasperreports.engine.DefaultJasperReportsContext;
36 import net.sf.jasperreports.engine.JRBoxContainer;
37 import net.sf.jasperreports.engine.JRChart;
38 import net.sf.jasperreports.engine.JRChartPlot;
39 import net.sf.jasperreports.engine.JRCommonElement;
40 import net.sf.jasperreports.engine.JRCommonGraphicElement;
41 import net.sf.jasperreports.engine.JRCommonImage;
42 import net.sf.jasperreports.engine.JRCommonRectangle;
43 import net.sf.jasperreports.engine.JRCommonText;
44 import net.sf.jasperreports.engine.JRDefaultStyleProvider;
45 import net.sf.jasperreports.engine.JRFont;
46 import net.sf.jasperreports.engine.JRImageAlignment;
47 import net.sf.jasperreports.engine.JRLineBox;
48 import net.sf.jasperreports.engine.JRParagraph;
49 import net.sf.jasperreports.engine.JRParagraphContainer;
50 import net.sf.jasperreports.engine.JRPen;
51 import net.sf.jasperreports.engine.JRPenContainer;
52 import net.sf.jasperreports.engine.JRPropertiesUtil;
53 import net.sf.jasperreports.engine.JRStyle;
54 import net.sf.jasperreports.engine.JRStyleContainer;
55 import net.sf.jasperreports.engine.JRTextAlignment;
56 import net.sf.jasperreports.engine.JRTextField;
57 import net.sf.jasperreports.engine.JasperReportsContext;
58 import net.sf.jasperreports.engine.TabStop;
59 import net.sf.jasperreports.engine.base.JRBoxPen;
60 import net.sf.jasperreports.engine.type.FillEnum;
61 import net.sf.jasperreports.engine.type.HorizontalImageAlignEnum;
62 import net.sf.jasperreports.engine.type.HorizontalTextAlignEnum;
63 import net.sf.jasperreports.engine.type.LineSpacingEnum;
64 import net.sf.jasperreports.engine.type.LineStyleEnum;
65 import net.sf.jasperreports.engine.type.ModeEnum;
66 import net.sf.jasperreports.engine.type.RotationEnum;
67 import net.sf.jasperreports.engine.type.ScaleImageEnum;
68 import net.sf.jasperreports.engine.type.VerticalImageAlignEnum;
69 import net.sf.jasperreports.engine.type.VerticalTextAlignEnum;
70 import net.sf.jasperreports.properties.PropertyConstants;
71
72
73
76 public class StyleResolver
77 {
78 @Property(
79 category = PropertyConstants.CATEGORY_DESIGN,
80 defaultValue = PropertyConstants.BOOLEAN_TRUE,
81 scopes = {PropertyScope.CONTEXT},
82 sinceVersion = PropertyConstants.VERSION_6_2_1,
83 valueType = Boolean.class
84 )
85 public static final String PROPERTY_STYLES_INHERIT_FROM_DEFAULT = JRPropertiesUtil.PROPERTY_PREFIX + "styles.inherit.from.default";
86
87 private static final StyleResolver INSTANCE = new StyleResolver(DefaultJasperReportsContext.getInstance());
88
89 private static final Integer INTEGER_ZERO = 0;
90
91 private final JRPropertiesUtil propertiesUtil;
92 private final Boolean stylesInheritFromDefault;
93
94
95
98 public StyleResolver(JasperReportsContext jasperReportsContext)
99 {
100 propertiesUtil = JRPropertiesUtil.getInstance(jasperReportsContext);
101 stylesInheritFromDefault = propertiesUtil.getBooleanProperty(PROPERTY_STYLES_INHERIT_FROM_DEFAULT);
102 }
103
104
107 public static StyleResolver getInstance()
108 {
109 return INSTANCE;
110 }
111
112
115 public JRStyle getBaseStyle(JRStyle styleContainer)
116 {
117 if (styleContainer != null)
118 {
119 JRStyle style = styleContainer.getStyle();
120 if (style != null)
121 {
122 return style;
123 }
124 if (stylesInheritFromDefault && !styleContainer.isDefault())
125 {
126 JRDefaultStyleProvider defaultStyleProvider = styleContainer.getDefaultStyleProvider();
127 if (defaultStyleProvider != null)
128 {
129 return defaultStyleProvider.getDefaultStyle();
130 }
131 }
132 }
133 return null;
134 }
135
136
139 public JRStyle getBaseStyle(JRLineBox box)
140 {
141 if (box != null)
142 {
143 JRBoxContainer boxContainer = box.getBoxContainer();
144
145 if (boxContainer instanceof JRStyle)
146 {
147 return getBaseStyle((JRStyle)boxContainer);
148 }
149
150 return getBaseStyle(boxContainer);
151 }
152 return null;
153 }
154
155
158 public JRStyle getBaseStyle(JRPen pen)
159 {
160 if (pen != null)
161 {
162 JRPenContainer penContainer = pen.getPenContainer();
163
164 if (penContainer instanceof JRStyle)
165 {
166 return getBaseStyle((JRStyle)penContainer);
167 }
168
169 if (penContainer instanceof JRLineBox)
170 {
171 return getBaseStyle((JRLineBox)penContainer);
172 }
173
174 return getBaseStyle(penContainer);
175 }
176 return null;
177 }
178
179
182 public JRStyle getBaseStyle(JRParagraph paragraph)
183 {
184 if (paragraph != null)
185 {
186 JRParagraphContainer paragraphContainer = paragraph.getParagraphContainer();
187
188 if (paragraphContainer instanceof JRStyle)
189 {
190 return getBaseStyle((JRStyle)paragraphContainer);
191 }
192
193 return getBaseStyle(paragraphContainer);
194 }
195 return null;
196 }
197
198
201 public JRStyle getBaseStyle(JRStyleContainer styleContainer)
202 {
203 if (styleContainer != null)
204 {
205 if (styleContainer instanceof JRStyle)
206 {
207 return getBaseStyle((JRStyle)styleContainer);
208 }
209 return getBaseStyleFromStyleContainer(styleContainer);
210 }
211 return null;
212 }
213
214
217 protected static JRStyle getBaseStyleFromStyleContainer(JRStyleContainer styleContainer)
218 {
219 if (styleContainer != null)
220 {
221 JRStyle style = styleContainer.getStyle();
222 if (style != null)
223 {
224 return style;
225 }
226 JRDefaultStyleProvider defaultStyleProvider = styleContainer.getDefaultStyleProvider();
227 if (defaultStyleProvider != null)
228 {
229 return defaultStyleProvider.getDefaultStyle();
230 }
231 }
232 return null;
233 }
234
235
238 public ModeEnum getMode(JRCommonElement element, ModeEnum defaultMode)
239 {
240 ModeEnum ownMode = element.getOwnModeValue();
241 if (ownMode != null)
242 {
243 return ownMode;
244 }
245 JRStyle style = getBaseStyle(element);
246 if (style != null)
247 {
248 ModeEnum mode = style.getModeValue();
249 if (mode != null)
250 {
251 return mode;
252 }
253 }
254 return defaultMode;
255 }
256
257
260 public ModeEnum getModeValue(JRStyle style)
261 {
262 ModeEnum ownMode = style.getOwnModeValue();
263 if (ownMode != null)
264 {
265 return ownMode;
266 }
267 JRStyle baseStyle = getBaseStyle(style);
268 if (baseStyle != null)
269 {
270 return baseStyle.getModeValue();
271 }
272 return null;
273 }
274
275
278 public Color getForecolor(JRCommonElement element)
279 {
280 Color ownForecolor = element.getOwnForecolor();
281 if (ownForecolor != null)
282 {
283 return ownForecolor;
284 }
285 JRStyle style = getBaseStyle(element);
286 if (style != null)
287 {
288 Color forecolor = style.getForecolor();
289 if (forecolor != null)
290 {
291 return forecolor;
292 }
293 }
294 return Color.black;
295 }
296
297
300 public Color getForecolor(JRChartPlot plot)
301 {
302 JRChart chart = plot.getChart();
303 if (chart != null)
304 {
305 return getForecolor(chart);
306 }
307 return Color.black;
308 }
309
310
313 public Color getForecolor(JRStyle style)
314 {
315 Color ownForecolor = style.getOwnForecolor();
316 if (ownForecolor != null)
317 {
318 return ownForecolor;
319 }
320 JRStyle baseStyle = getBaseStyle(style);
321 if (baseStyle != null)
322 {
323 return baseStyle.getForecolor();
324 }
325 return null;
326 }
327
328
331 public Color getBackcolor(JRCommonElement element)
332 {
333 Color ownBackcolor = element.getOwnBackcolor();
334 if (ownBackcolor != null)
335 {
336 return ownBackcolor;
337 }
338 JRStyle style = getBaseStyle(element);
339 if (style != null)
340 {
341 Color backcolor = style.getBackcolor();
342 if (backcolor != null)
343 {
344 return backcolor;
345 }
346 }
347 return Color.white;
348 }
349
350
353 public Color getBackcolor(JRChartPlot plot)
354 {
355 Color ownBackcolor = plot.getOwnBackcolor();
356 if (ownBackcolor != null)
357 {
358 return ownBackcolor;
359 }
360 JRChart chart = plot.getChart();
361 if (chart != null)
362 {
363 return getBackcolor(chart);
364 }
365 return Color.white;
366 }
367
368
371 public Color getBackcolor(JRStyle style)
372 {
373 Color ownBackcolor = style.getOwnBackcolor();
374 if (ownBackcolor != null)
375 {
376 return ownBackcolor;
377 }
378 JRStyle baseStyle = getBaseStyle(style);
379 if (baseStyle != null)
380 {
381 return baseStyle.getBackcolor();
382 }
383 return null;
384 }
385
386
389 public Float getLineWidth(JRPen pen, Float defaultLineWidth)
390 {
391 Float ownLineWidth = pen.getOwnLineWidth();
392 if (ownLineWidth != null)
393 {
394 return ownLineWidth;
395 }
396 JRStyle baseStyle = getBaseStyle(pen);
397 if (baseStyle != null)
398 {
399 Float lineWidth = baseStyle.getLinePen().getLineWidth();
400 if (lineWidth != null)
401 {
402 return lineWidth;
403 }
404 }
405 return defaultLineWidth;
406 }
407
408
411 public Float getLineWidth(JRBoxPen boxPen, Float defaultLineWidth)
412 {
413 Float ownLineWidth = boxPen.getOwnLineWidth();
414 if (ownLineWidth != null)
415 {
416 return ownLineWidth;
417 }
418 Float penLineWidth = boxPen.getBox().getPen().getOwnLineWidth();
419 if (penLineWidth != null)
420 {
421 return penLineWidth;
422 }
423 JRStyle baseStyle = getBaseStyle(boxPen);
424 if (baseStyle != null)
425 {
426 Float lineWidth = boxPen.getPen(baseStyle.getLineBox()).getLineWidth();
427 if (lineWidth != null)
428 {
429 return lineWidth;
430 }
431 }
432 return defaultLineWidth;
433 }
434
435
438 public LineStyleEnum getLineStyleValue(JRPen pen)
439 {
440 LineStyleEnum ownLineStyle = pen.getOwnLineStyleValue();
441 if (ownLineStyle != null)
442 {
443 return ownLineStyle;
444 }
445 JRStyle baseStyle = getBaseStyle(pen);
446 if (baseStyle != null)
447 {
448 LineStyleEnum lineStyle = baseStyle.getLinePen().getLineStyleValue();
449 if (lineStyle != null)
450 {
451 return lineStyle;
452 }
453 }
454 return LineStyleEnum.SOLID;
455 }
456
457
460 public LineStyleEnum getLineStyleValue(JRBoxPen boxPen)
461 {
462 LineStyleEnum ownLineStyle = boxPen.getOwnLineStyleValue();
463 if (ownLineStyle != null)
464 {
465 return ownLineStyle;
466 }
467 LineStyleEnum penLineStyle = boxPen.getBox().getPen().getOwnLineStyleValue();
468 if (penLineStyle != null)
469 {
470 return penLineStyle;
471 }
472 JRStyle baseStyle = getBaseStyle(boxPen);
473 if (baseStyle != null)
474 {
475 LineStyleEnum lineStyle = boxPen.getPen(baseStyle.getLineBox()).getLineStyleValue();
476 if (lineStyle != null)
477 {
478 return lineStyle;
479 }
480 }
481 return LineStyleEnum.SOLID;
482 }
483
484
487 public Color getLineColor(JRPen pen, Color defaultColor)
488 {
489 Color ownLineColor = pen.getOwnLineColor();
490 if (ownLineColor != null)
491 {
492 return ownLineColor;
493 }
494 JRStyle baseStyle = getBaseStyle(pen);
495 if (baseStyle != null)
496 {
497 Color lineColor = baseStyle.getLinePen().getLineColor();
498 if (lineColor != null)
499 {
500 return lineColor;
501 }
502 }
503 return defaultColor;
504 }
505
506
509 public Color getLineColor(JRBoxPen boxPen, Color defaultColor)
510 {
511
512
513 Color ownLineColor = boxPen.getOwnLineColor();
514 if (ownLineColor != null)
515 {
516 return ownLineColor;
517 }
518 Color penLineColor = boxPen.getBox().getPen().getOwnLineColor();
519 if (penLineColor != null)
520 {
521 return penLineColor;
522 }
523 JRStyle baseStyle = getBaseStyle(boxPen);
524 if (baseStyle != null)
525 {
526 Color lineColor = boxPen.getPen(baseStyle.getLineBox()).getLineColor();
527 if (lineColor != null)
528 {
529 return lineColor;
530 }
531 }
532 return defaultColor;
533 }
534
535
538 public FillEnum getFillValue(JRCommonGraphicElement element)
539 {
540 FillEnum ownFill = element.getOwnFillValue();
541 if (ownFill != null)
542 {
543 return ownFill;
544 }
545 JRStyle baseStyle = getBaseStyle(element);
546 if (baseStyle != null)
547 {
548 FillEnum fill = baseStyle.getFillValue();
549 if (fill != null)
550 {
551 return fill;
552 }
553 }
554 return FillEnum.SOLID;
555 }
556
557
560 public FillEnum getFillValue(JRStyle style)
561 {
562 FillEnum ownFill = style.getOwnFillValue();
563 if (ownFill != null)
564 {
565 return ownFill;
566 }
567 JRStyle baseStyle = getBaseStyle(style);
568 if (baseStyle != null)
569 {
570 return baseStyle.getFillValue();
571 }
572 return null;
573 }
574
575
578 public int getRadius(JRCommonRectangle rectangle)
579 {
580 Integer ownRadius = rectangle.getOwnRadius();
581 if (ownRadius != null)
582 {
583 return ownRadius;
584 }
585 JRStyle baseStyle = getBaseStyle(rectangle);
586 if (baseStyle != null)
587 {
588 Integer radius = baseStyle.getRadius();
589 if (radius != null)
590 {
591 return radius;
592 }
593 }
594 return 0;
595 }
596
597
600 public Integer getRadius(JRStyle style)
601 {
602 Integer ownRadius = style.getOwnRadius();
603 if (ownRadius != null)
604 {
605 return ownRadius;
606 }
607 JRStyle baseStyle = getBaseStyle(style);
608 if (baseStyle != null)
609 {
610 return baseStyle.getRadius();
611 }
612 return null;
613 }
614
615
618 public ScaleImageEnum getScaleImageValue(JRCommonImage image)
619 {
620 ScaleImageEnum ownScaleImage = image.getOwnScaleImageValue();
621 if (ownScaleImage != null)
622 {
623 return ownScaleImage;
624 }
625 JRStyle baseStyle = getBaseStyle(image);
626 if (baseStyle != null)
627 {
628 ScaleImageEnum scaleImage = baseStyle.getScaleImageValue();
629 if (scaleImage != null)
630 {
631 return scaleImage;
632 }
633 }
634 return ScaleImageEnum.RETAIN_SHAPE;
635 }
636
637
640 public ScaleImageEnum getScaleImageValue(JRStyle style)
641 {
642 ScaleImageEnum ownScaleImage = style.getOwnScaleImageValue();
643 if (ownScaleImage != null)
644 {
645 return ownScaleImage;
646 }
647 JRStyle baseStyle = getBaseStyle(style);
648 if (baseStyle != null )
649 {
650 return baseStyle.getScaleImageValue();
651 }
652 return null;
653 }
654
655
658 public HorizontalTextAlignEnum getHorizontalTextAlign(JRTextAlignment alignment)
659 {
660 HorizontalTextAlignEnum ownHorizontalAlignment = alignment.getOwnHorizontalTextAlign();
661 if (ownHorizontalAlignment != null)
662 {
663 return ownHorizontalAlignment;
664 }
665 JRStyle baseStyle = getBaseStyle(alignment);
666 if (baseStyle != null)
667 {
668 HorizontalTextAlignEnum horizontalAlignment = baseStyle.getHorizontalTextAlign();
669 if (horizontalAlignment != null)
670 {
671 return horizontalAlignment;
672 }
673 }
674 return HorizontalTextAlignEnum.LEFT;
675 }
676
677
680 public HorizontalImageAlignEnum getHorizontalImageAlign(JRImageAlignment alignment)
681 {
682 HorizontalImageAlignEnum ownHorizontalAlignment = alignment.getOwnHorizontalImageAlign();
683 if (ownHorizontalAlignment != null)
684 {
685 return ownHorizontalAlignment;
686 }
687 JRStyle baseStyle = getBaseStyle(alignment);
688 if (baseStyle != null)
689 {
690 HorizontalImageAlignEnum horizontalAlignment = baseStyle.getHorizontalImageAlign();
691 if (horizontalAlignment != null)
692 {
693 return horizontalAlignment;
694 }
695 }
696 return HorizontalImageAlignEnum.LEFT;
697 }
698
699
702 public HorizontalTextAlignEnum getHorizontalTextAlign(JRStyle style)
703 {
704 HorizontalTextAlignEnum ownHorizontalAlignment = style.getOwnHorizontalTextAlign();
705 if (ownHorizontalAlignment != null)
706 {
707 return ownHorizontalAlignment;
708 }
709 JRStyle baseStyle = getBaseStyle(style);
710 if (baseStyle != null)
711 {
712 return baseStyle.getHorizontalTextAlign();
713 }
714 return null;
715 }
716
717
720 public HorizontalImageAlignEnum getHorizontalImageAlign(JRStyle style)
721 {
722 HorizontalImageAlignEnum ownHorizontalAlignment = style.getOwnHorizontalImageAlign();
723 if (ownHorizontalAlignment != null)
724 {
725 return ownHorizontalAlignment;
726 }
727 JRStyle baseStyle = getBaseStyle(style);
728 if (baseStyle != null)
729 {
730 return baseStyle.getHorizontalImageAlign();
731 }
732 return null;
733 }
734
735
738 public VerticalTextAlignEnum getVerticalTextAlign(JRTextAlignment alignment)
739 {
740 VerticalTextAlignEnum ownVerticalAlignment = alignment.getOwnVerticalTextAlign();
741 if (ownVerticalAlignment != null)
742 {
743 return ownVerticalAlignment;
744 }
745 JRStyle baseStyle = getBaseStyle(alignment);
746 if (baseStyle != null)
747 {
748 VerticalTextAlignEnum verticalAlignment = baseStyle.getVerticalTextAlign();
749 if (verticalAlignment != null)
750 {
751 return verticalAlignment;
752 }
753 }
754 return VerticalTextAlignEnum.TOP;
755 }
756
757
760 public VerticalImageAlignEnum getVerticalImageAlign(JRImageAlignment alignment)
761 {
762 VerticalImageAlignEnum ownVerticalAlignment = alignment.getOwnVerticalImageAlign();
763 if (ownVerticalAlignment != null)
764 {
765 return ownVerticalAlignment;
766 }
767 JRStyle baseStyle = getBaseStyle(alignment);
768 if (baseStyle != null)
769 {
770 VerticalImageAlignEnum verticalAlignment = baseStyle.getVerticalImageAlign();
771 if (verticalAlignment != null)
772 {
773 return verticalAlignment;
774 }
775 }
776 return VerticalImageAlignEnum.TOP;
777 }
778
779
782 public VerticalTextAlignEnum getVerticalTextAlign(JRStyle style)
783 {
784 VerticalTextAlignEnum ownVerticalAlignment = style.getOwnVerticalTextAlign();
785 if (ownVerticalAlignment != null)
786 {
787 return ownVerticalAlignment;
788 }
789 JRStyle baseStyle = getBaseStyle(style);
790 if (baseStyle != null)
791 {
792 return baseStyle.getVerticalTextAlign();
793 }
794 return null;
795 }
796
797
800 public VerticalImageAlignEnum getVerticalImageAlign(JRStyle style)
801 {
802 VerticalImageAlignEnum ownVerticalAlignment = style.getOwnVerticalImageAlign();
803 if (ownVerticalAlignment != null)
804 {
805 return ownVerticalAlignment;
806 }
807 JRStyle baseStyle = getBaseStyle(style);
808 if (baseStyle != null)
809 {
810 return baseStyle.getVerticalImageAlign();
811 }
812 return null;
813 }
814
815
818 public Float getLineSpacingSize(JRParagraph paragraph)
819 {
820 Float ownLineSpacingSize = paragraph.getOwnLineSpacingSize();
821 if (ownLineSpacingSize != null)
822 {
823 return ownLineSpacingSize;
824 }
825 JRStyle style = getBaseStyle(paragraph);
826 if (style != null)
827 {
828 Float lineSpacingSize = style.getParagraph().getLineSpacingSize();
829 if (lineSpacingSize != null)
830 {
831 return lineSpacingSize;
832 }
833 }
834 return propertiesUtil.getFloatProperty(JRParagraph.DEFAULT_LINE_SPACING_SIZE);
835 }
836
837
840 public Integer getFirstLineIndent(JRParagraph paragraph)
841 {
842 Integer ownFirstLineIndent = paragraph.getOwnFirstLineIndent();
843 if (ownFirstLineIndent != null)
844 {
845 return ownFirstLineIndent;
846 }
847 JRStyle style = getBaseStyle(paragraph);
848 if (style != null)
849 {
850 Integer firstLineIndent = style.getParagraph().getFirstLineIndent();
851 if (firstLineIndent != null)
852 {
853 return firstLineIndent;
854 }
855 }
856 return propertiesUtil.getIntegerProperty(JRParagraph.DEFAULT_FIRST_LINE_INDENT);
857 }
858
859
862 public Integer getLeftIndent(JRParagraph paragraph)
863 {
864 Integer ownLeftIndent = paragraph.getOwnLeftIndent();
865 if (ownLeftIndent != null)
866 {
867 return ownLeftIndent;
868 }
869 JRStyle style = getBaseStyle(paragraph);
870 if (style != null)
871 {
872 Integer leftIndent = style.getParagraph().getLeftIndent();
873 if (leftIndent != null)
874 {
875 return leftIndent;
876 }
877 }
878 return propertiesUtil.getIntegerProperty(JRParagraph.DEFAULT_LEFT_INDENT);
879 }
880
881
884 public Integer getRightIndent(JRParagraph paragraph)
885 {
886 Integer ownRightIndent = paragraph.getOwnRightIndent();
887 if (ownRightIndent != null)
888 {
889 return ownRightIndent;
890 }
891 JRStyle style = getBaseStyle(paragraph);
892 if (style != null)
893 {
894 Integer rightIndent = style.getParagraph().getRightIndent();
895 if (rightIndent != null)
896 {
897 return rightIndent;
898 }
899 }
900 return propertiesUtil.getIntegerProperty(JRParagraph.DEFAULT_RIGHT_INDENT);
901 }
902
903
906 public Integer getSpacingBefore(JRParagraph paragraph)
907 {
908 Integer ownSpacingBefore = paragraph.getOwnSpacingBefore();
909 if (ownSpacingBefore != null)
910 {
911 return ownSpacingBefore;
912 }
913 JRStyle style = getBaseStyle(paragraph);
914 if (style != null)
915 {
916 Integer spacingBefore = style.getParagraph().getSpacingBefore();
917 if (spacingBefore != null)
918 {
919 return spacingBefore;
920 }
921 }
922 return propertiesUtil.getIntegerProperty(JRParagraph.DEFAULT_SPACING_BEFORE);
923 }
924
925
928 public Integer getSpacingAfter(JRParagraph paragraph)
929 {
930 Integer ownSpacingAfter = paragraph.getOwnSpacingAfter();
931 if (ownSpacingAfter != null)
932 {
933 return ownSpacingAfter;
934 }
935 JRStyle style = getBaseStyle(paragraph);
936 if (style != null)
937 {
938 Integer spacingAfter = style.getParagraph().getSpacingAfter();
939 if (spacingAfter != null)
940 {
941 return spacingAfter;
942 }
943 }
944 return propertiesUtil.getIntegerProperty(JRParagraph.DEFAULT_SPACING_AFTER);
945 }
946
947
950 public Integer getTabStopWidth(JRParagraph paragraph)
951 {
952 Integer ownTabStopWidth = paragraph.getOwnTabStopWidth();
953 if (ownTabStopWidth != null)
954 {
955 return ownTabStopWidth;
956 }
957 JRStyle style = getBaseStyle(paragraph);
958 if (style != null)
959 {
960 Integer tabStopWidth = style.getParagraph().getTabStopWidth();
961 if (tabStopWidth != null)
962 {
963 return tabStopWidth;
964 }
965 }
966 return propertiesUtil.getIntegerProperty(JRParagraph.DEFAULT_TAB_STOP_WIDTH);
967 }
968
969
972 public TabStop[] getTabStops(JRParagraph paragraph)
973 {
974 TabStop[] ownTabStops = paragraph.getOwnTabStops();
975 if (ownTabStops != null)
976 {
977 return ownTabStops;
978 }
979 JRStyle style = getBaseStyle(paragraph);
980 if (style != null)
981 {
982 TabStop[] tabStops = style.getParagraph().getTabStops();
983 if (tabStops != null)
984 {
985 return tabStops;
986 }
987 }
988 return null;
989 }
990
991
994 public RotationEnum getRotationValue(JRCommonText element)
995 {
996 RotationEnum ownRotation = element.getOwnRotationValue();
997 if (ownRotation != null)
998 {
999 return ownRotation;
1000 }
1001 JRStyle style = getBaseStyle(element);
1002 if (style != null)
1003 {
1004 RotationEnum rotation = style.getRotationValue();
1005 if (rotation != null)
1006 {
1007 return rotation;
1008 }
1009 }
1010 return RotationEnum.NONE;
1011 }
1012
1013
1016 public RotationEnum getRotation(JRCommonImage element)
1017 {
1018 RotationEnum ownRotation = element.getOwnRotation();
1019 if (ownRotation != null)
1020 {
1021 return ownRotation;
1022 }
1023 JRStyle style = getBaseStyle(element);
1024 if (style != null)
1025 {
1026 RotationEnum rotation = style.getRotationValue();
1027 if (rotation != null)
1028 {
1029 return rotation;
1030 }
1031 }
1032 return RotationEnum.NONE;
1033 }
1034
1035
1038 public RotationEnum getRotationValue(JRStyle style)
1039 {
1040 RotationEnum ownRotation = style.getOwnRotationValue();
1041 if (ownRotation != null)
1042 {
1043 return ownRotation;
1044 }
1045 JRStyle baseStyle = getBaseStyle(style);
1046 if (baseStyle != null)
1047 {
1048 return baseStyle.getRotationValue();
1049 }
1050 return null;
1051 }
1052
1053
1056 public LineSpacingEnum getLineSpacing(JRParagraph paragraph)
1057 {
1058 LineSpacingEnum ownLineSpacing = paragraph.getOwnLineSpacing();
1059 if (ownLineSpacing != null)
1060 {
1061 return ownLineSpacing;
1062 }
1063 JRStyle baseStyle = getBaseStyle(paragraph);
1064 if (baseStyle != null)
1065 {
1066 LineSpacingEnum lineSpacing = baseStyle.getParagraph().getLineSpacing();
1067 if (lineSpacing != null)
1068 {
1069 return lineSpacing;
1070 }
1071 }
1072 return LineSpacingEnum.SINGLE;
1073 }
1074
1075
1078 public String getMarkup(JRCommonText element)
1079 {
1080 String ownMarkup = element.getOwnMarkup();
1081 if (ownMarkup != null)
1082 {
1083 return ownMarkup;
1084 }
1085 JRStyle baseStyle = getBaseStyle(element);
1086 if (baseStyle != null)
1087 {
1088 String markup = baseStyle.getMarkup();
1089 if (markup != null)
1090 {
1091 return markup;
1092 }
1093 }
1094 return JRCommonText.MARKUP_NONE;
1095 }
1096
1097
1100 public String getMarkup(JRStyle style)
1101 {
1102 String ownMarkup = style.getOwnMarkup();
1103 if (ownMarkup != null)
1104 {
1105 return ownMarkup;
1106 }
1107 JRStyle baseStyle = getBaseStyle(style);
1108 if (baseStyle != null)
1109 {
1110 return baseStyle.getMarkup();
1111 }
1112 return JRCommonText.MARKUP_NONE;
1113 }
1114
1115
1118 public String getPattern(JRTextField element)
1119 {
1120 String ownPattern = element.getOwnPattern();
1121 if (ownPattern != null)
1122 {
1123 return ownPattern;
1124 }
1125 JRStyle baseStyle = getBaseStyle(element);
1126 if (baseStyle != null)
1127 {
1128 return baseStyle.getPattern();
1129 }
1130 return null;
1131 }
1132
1133
1136 public String getPattern(JRStyle style)
1137 {
1138 String ownPattern = style.getOwnPattern();
1139 if (ownPattern != null)
1140 {
1141 return ownPattern;
1142 }
1143 JRStyle baseStyle = getBaseStyle(style);
1144 if (baseStyle != null)
1145 {
1146 return baseStyle.getPattern();
1147 }
1148 return null;
1149 }
1150
1151
1154 public boolean isBlankWhenNull(JRTextField element)
1155 {
1156 Boolean ownBlankWhenNull = element.isOwnBlankWhenNull();
1157 if (ownBlankWhenNull != null)
1158 {
1159 return ownBlankWhenNull;
1160 }
1161 JRStyle baseStyle = getBaseStyle(element);
1162 if (baseStyle != null)
1163 {
1164 Boolean blankWhenNull = baseStyle.isBlankWhenNull();
1165 if (blankWhenNull != null)
1166 {
1167 return blankWhenNull;
1168 }
1169 }
1170 return false;
1171 }
1172
1173
1176 public Boolean isBlankWhenNull(JRStyle style)
1177 {
1178 Boolean ownBlankWhenNull = style.isOwnBlankWhenNull();
1179 if (ownBlankWhenNull != null)
1180 {
1181 return ownBlankWhenNull;
1182 }
1183 JRStyle baseStyle = getBaseStyle(style);
1184 if (baseStyle != null)
1185 {
1186 return baseStyle.isBlankWhenNull();
1187 }
1188 return null;
1189 }
1190
1191
1194 public String getFontName(JRFont font)
1195 {
1196 String ownFontName = font.getOwnFontName();
1197 if (ownFontName != null)
1198 {
1199 return ownFontName;
1200 }
1201 JRStyle baseStyle = getBaseStyle(font);
1202 if (baseStyle != null)
1203 {
1204 String fontName = baseStyle.getFontName();
1205 if (fontName != null)
1206 {
1207 return fontName;
1208 }
1209 }
1210 return propertiesUtil.getProperty(JRFont.DEFAULT_FONT_NAME);
1211 }
1212
1213
1216 public String getFontName(JRStyle style)
1217 {
1218 String ownFontName = style.getOwnFontName();
1219 if (ownFontName != null)
1220 {
1221 return ownFontName;
1222 }
1223 JRStyle baseStyle = getBaseStyle(style);
1224 if (baseStyle != null)
1225 {
1226 String fontName = baseStyle.getFontName();
1227 if (fontName != null)
1228 {
1229 return fontName;
1230 }
1231 }
1232 return propertiesUtil.getProperty(JRFont.DEFAULT_FONT_NAME);
1233 }
1234
1235
1238 public boolean isBold(JRFont font)
1239 {
1240 Boolean ownBold = font.isOwnBold();
1241 if (ownBold != null)
1242 {
1243 return ownBold;
1244 }
1245 JRStyle baseStyle = getBaseStyle(font);
1246 if (baseStyle != null)
1247 {
1248 Boolean bold = baseStyle.isBold();
1249 if (bold != null)
1250 {
1251 return bold;
1252 }
1253 }
1254 return false;
1255 }
1256
1257
1260 public Boolean isBold(JRStyle style)
1261 {
1262 Boolean ownBold = style.isOwnBold();
1263 if (ownBold != null)
1264 {
1265 return ownBold;
1266 }
1267 JRStyle baseStyle = getBaseStyle(style);
1268 if (baseStyle != null)
1269 {
1270 return baseStyle.isBold();
1271 }
1272 return null;
1273 }
1274
1275
1278 public boolean isItalic(JRFont font)
1279 {
1280 Boolean ownItalic = font.isOwnItalic();
1281 if (ownItalic != null)
1282 {
1283 return ownItalic;
1284 }
1285 JRStyle baseStyle = getBaseStyle(font);
1286 if (baseStyle != null)
1287 {
1288 Boolean italic = baseStyle.isItalic();
1289 if (italic != null)
1290 {
1291 return italic;
1292 }
1293 }
1294 return false;
1295 }
1296
1297
1300 public Boolean isItalic(JRStyle style)
1301 {
1302 Boolean ownItalic = style.isOwnItalic();
1303 if (ownItalic != null)
1304 {
1305 return ownItalic;
1306 }
1307 JRStyle baseStyle = getBaseStyle(style);
1308 if (baseStyle != null)
1309 {
1310 return baseStyle.isItalic();
1311 }
1312 return null;
1313 }
1314
1315
1318 public boolean isUnderline(JRFont font)
1319 {
1320 Boolean ownUnderline = font.isOwnUnderline();
1321 if (ownUnderline != null)
1322 {
1323 return ownUnderline;
1324 }
1325 JRStyle baseStyle = getBaseStyle(font);
1326 if (baseStyle != null)
1327 {
1328 Boolean underline = baseStyle.isUnderline();
1329 if (underline != null)
1330 {
1331 return underline;
1332 }
1333 }
1334 return false;
1335 }
1336
1337
1340 public Boolean isUnderline(JRStyle style)
1341 {
1342 Boolean ownUnderline = style.isOwnUnderline();
1343 if (ownUnderline != null)
1344 {
1345 return ownUnderline;
1346 }
1347 JRStyle baseStyle = getBaseStyle(style);
1348 if (baseStyle != null)
1349 {
1350 return baseStyle.isUnderline();
1351 }
1352 return null;
1353 }
1354
1355
1358 public boolean isStrikeThrough(JRFont font)
1359 {
1360 Boolean ownStrikeThrough = font.isOwnStrikeThrough();
1361 if (ownStrikeThrough != null)
1362 {
1363 return ownStrikeThrough;
1364 }
1365 JRStyle baseStyle = getBaseStyle(font);
1366 if (baseStyle != null)
1367 {
1368 Boolean strikeThrough = baseStyle.isStrikeThrough();
1369 if (strikeThrough != null)
1370 {
1371 return strikeThrough;
1372 }
1373 }
1374 return false;
1375 }
1376
1377
1380 public Boolean isStrikeThrough(JRStyle style)
1381 {
1382 if (style.isOwnStrikeThrough() != null)
1383 {
1384 return style.isOwnStrikeThrough();
1385 }
1386 JRStyle baseStyle = getBaseStyle(style);
1387 if (baseStyle != null)
1388 {
1389 return baseStyle.isStrikeThrough();
1390 }
1391 return null;
1392 }
1393
1394
1397 public float getFontsize(JRFont font)
1398 {
1399 Float ownFontSize = font.getOwnFontsize();
1400 if (ownFontSize != null)
1401 {
1402 return ownFontSize;
1403 }
1404 JRStyle baseStyle = getBaseStyle(font);
1405 if (baseStyle != null)
1406 {
1407 Float fontSize = baseStyle.getFontsize();
1408 if (fontSize != null)
1409 {
1410 return fontSize;
1411 }
1412 }
1413 return propertiesUtil.getFloatProperty(JRFont.DEFAULT_FONT_SIZE);
1414 }
1415
1416
1419 public Float getFontsize(JRStyle style)
1420 {
1421 Float ownFontSize = style.getOwnFontsize();
1422 if (ownFontSize != null)
1423 {
1424 return ownFontSize;
1425 }
1426 JRStyle baseStyle = getBaseStyle(style);
1427 if (baseStyle != null)
1428 {
1429 return baseStyle.getFontsize();
1430 }
1431 return null;
1432 }
1433
1434
1437 public String getPdfFontName(JRFont font)
1438 {
1439 String ownPdfFontName = font.getOwnPdfFontName();
1440 if (ownPdfFontName != null)
1441 {
1442 return ownPdfFontName;
1443 }
1444 JRStyle baseStyle = getBaseStyle(font);
1445 if (baseStyle != null)
1446 {
1447 String pdfFontName = baseStyle.getPdfFontName();
1448 if (pdfFontName != null)
1449 {
1450 return pdfFontName;
1451 }
1452 }
1453 return propertiesUtil.getProperty(JRFont.DEFAULT_PDF_FONT_NAME);
1454 }
1455
1456
1459 public String getPdfFontName(JRStyle style)
1460 {
1461 String ownPdfFontName = style.getOwnPdfFontName();
1462 if (ownPdfFontName != null)
1463 {
1464 return ownPdfFontName;
1465 }
1466 JRStyle baseStyle = getBaseStyle(style);
1467 if (baseStyle != null)
1468 {
1469 String pdfFontName = baseStyle.getPdfFontName();
1470 if (pdfFontName != null)
1471 {
1472 return pdfFontName;
1473 }
1474 }
1475 return propertiesUtil.getProperty(JRFont.DEFAULT_PDF_FONT_NAME);
1476 }
1477
1478
1481 public String getPdfEncoding(JRFont font)
1482 {
1483 String ownPdfEncoding = font.getOwnPdfEncoding();
1484 if (ownPdfEncoding != null)
1485 {
1486 return ownPdfEncoding;
1487 }
1488 JRStyle baseStyle = getBaseStyle(font);
1489 if (baseStyle != null)
1490 {
1491 String pdfEncoding = baseStyle.getPdfEncoding();
1492 if (pdfEncoding != null)
1493 {
1494 return pdfEncoding;
1495 }
1496 }
1497 return propertiesUtil.getProperty(JRFont.DEFAULT_PDF_ENCODING);
1498 }
1499
1500
1503 public String getPdfEncoding(JRStyle style)
1504 {
1505 String ownPdfEncoding = style.getOwnPdfEncoding();
1506 if (ownPdfEncoding != null)
1507 {
1508 return ownPdfEncoding;
1509 }
1510 JRStyle baseStyle = getBaseStyle(style);
1511 if (baseStyle != null)
1512 {
1513 String pdfEncoding = baseStyle.getPdfEncoding();
1514 if (pdfEncoding != null)
1515 {
1516 return pdfEncoding;
1517 }
1518 }
1519 return propertiesUtil.getProperty(JRFont.DEFAULT_PDF_ENCODING);
1520 }
1521
1522
1525 public boolean isPdfEmbedded(JRFont font)
1526 {
1527 Boolean ownPdfEmbedded = font.isOwnPdfEmbedded();
1528 if (ownPdfEmbedded != null)
1529 {
1530 return ownPdfEmbedded;
1531 }
1532 JRStyle baseStyle = getBaseStyle(font);
1533 if (baseStyle != null)
1534 {
1535 Boolean pdfEmbedded = baseStyle.isPdfEmbedded();
1536 if (pdfEmbedded != null)
1537 {
1538 return pdfEmbedded;
1539 }
1540 }
1541 return propertiesUtil.getBooleanProperty(JRFont.DEFAULT_PDF_EMBEDDED);
1542 }
1543
1544
1547 public Boolean isPdfEmbedded(JRStyle style)
1548 {
1549 Boolean ownPdfEmbedded = style.isOwnPdfEmbedded();
1550 if (ownPdfEmbedded != null)
1551 {
1552 return ownPdfEmbedded;
1553 }
1554 JRStyle baseStyle = getBaseStyle(style);
1555 if (baseStyle != null)
1556 {
1557 return baseStyle.isPdfEmbedded();
1558 }
1559 return null;
1560 }
1561
1562
1565 public Integer getPadding(JRLineBox box)
1566 {
1567 Integer ownPadding = box.getOwnPadding();
1568 if (ownPadding != null)
1569 {
1570 return ownPadding;
1571 }
1572 JRStyle baseStyle = getBaseStyle(box);
1573 if (baseStyle != null)
1574 {
1575 Integer padding = baseStyle.getLineBox().getPadding();
1576 if (padding != null)
1577 {
1578 return padding;
1579 }
1580 }
1581 return INTEGER_ZERO;
1582 }
1583
1584
1587 public Integer getTopPadding(JRLineBox box)
1588 {
1589 Integer ownTopPadding = box.getOwnTopPadding();
1590 if (ownTopPadding != null)
1591 {
1592 return ownTopPadding;
1593 }
1594 Integer ownPadding = box.getOwnPadding();
1595 if (ownPadding != null)
1596 {
1597 return ownPadding;
1598 }
1599 JRStyle style = getBaseStyle(box);
1600 if (style != null)
1601 {
1602 Integer topPadding = style.getLineBox().getTopPadding();
1603 if (topPadding != null)
1604 {
1605 return topPadding;
1606 }
1607 }
1608 return INTEGER_ZERO;
1609 }
1610
1611
1614 public Integer getLeftPadding(JRLineBox box)
1615 {
1616 Integer ownLeftPadding = box.getOwnLeftPadding();
1617 if (ownLeftPadding != null)
1618 {
1619 return ownLeftPadding;
1620 }
1621 Integer ownPadding = box.getOwnPadding();
1622 if (ownPadding != null)
1623 {
1624 return ownPadding;
1625 }
1626 JRStyle style = getBaseStyle(box);
1627 if (style != null)
1628 {
1629 Integer leftPadding = style.getLineBox().getLeftPadding();
1630 if (leftPadding != null)
1631 {
1632 return leftPadding;
1633 }
1634 }
1635 return INTEGER_ZERO;
1636 }
1637
1638
1641 public Integer getBottomPadding(JRLineBox box)
1642 {
1643 Integer ownBottomPadding = box.getOwnBottomPadding();
1644 if (ownBottomPadding != null)
1645 {
1646 return ownBottomPadding;
1647 }
1648 Integer ownPadding = box.getOwnPadding();
1649 if (ownPadding != null)
1650 {
1651 return ownPadding;
1652 }
1653 JRStyle style = getBaseStyle(box);
1654 if (style != null)
1655 {
1656 Integer bottomPadding = style.getLineBox().getBottomPadding();
1657 if (bottomPadding != null)
1658 {
1659 return bottomPadding;
1660 }
1661 }
1662 return INTEGER_ZERO;
1663 }
1664
1665
1668 public Integer getRightPadding(JRLineBox box)
1669 {
1670 Integer ownRightPadding = box.getOwnRightPadding();
1671 if (ownRightPadding != null)
1672 {
1673 return ownRightPadding;
1674 }
1675 Integer ownPadding = box.getOwnPadding();
1676 if (ownPadding != null)
1677 {
1678 return ownPadding;
1679 }
1680 JRStyle style = getBaseStyle(box);
1681 if (style != null)
1682 {
1683 Integer rightPadding = style.getLineBox().getRightPadding();
1684 if (rightPadding != null)
1685 {
1686 return rightPadding;
1687 }
1688 }
1689 return INTEGER_ZERO;
1690 }
1691
1692
1695 public Color getTitleColor(JRChart chart)
1696 {
1697 Color ownTitleColor = chart.getOwnTitleColor();
1698 if (ownTitleColor != null)
1699 {
1700 return ownTitleColor;
1701 }
1702 return getForecolor(chart);
1703 }
1704
1705
1708 public Color getSubtitleColor(JRChart chart)
1709 {
1710 Color ownSubtitleColor = chart.getOwnSubtitleColor();
1711 if (ownSubtitleColor != null)
1712 {
1713 return ownSubtitleColor;
1714 }
1715 return getForecolor(chart);
1716 }
1717
1718
1721 public Color getLegendColor(JRChart chart)
1722 {
1723 Color ownLegendColor = chart.getOwnLegendColor();
1724 if (ownLegendColor != null)
1725 {
1726 return ownLegendColor;
1727 }
1728 return getForecolor(chart);
1729 }
1730
1731
1734 public Color getLegendBackgroundColor(JRChart chart)
1735 {
1736 Color ownLegendBackgroundColor = chart.getOwnLegendBackgroundColor();
1737 if (ownLegendBackgroundColor != null)
1738 {
1739 return ownLegendBackgroundColor;
1740 }
1741 return getBackcolor(chart);
1742 }
1743
1744
1747 public Color getCategoryAxisLabelColor(JRCategoryAxisFormat axisFormat, JRChartPlot plot)
1748 {
1749 Color ownCategoryAxisLabelColor = axisFormat.getOwnCategoryAxisLabelColor();
1750 if (ownCategoryAxisLabelColor != null)
1751 {
1752 return ownCategoryAxisLabelColor;
1753 }
1754 return getForecolor(plot);
1755 }
1756
1757
1760 public Color getCategoryAxisTickLabelColor(JRCategoryAxisFormat axisFormat, JRChartPlot plot)
1761 {
1762 Color ownCategoryAxisTickLabelColor = axisFormat.getOwnCategoryAxisTickLabelColor();
1763 if (ownCategoryAxisTickLabelColor != null)
1764 {
1765 return ownCategoryAxisTickLabelColor;
1766 }
1767 return getForecolor(plot);
1768 }
1769
1770
1773 public Color getCategoryAxisLineColor(JRCategoryAxisFormat axisFormat, JRChartPlot plot)
1774 {
1775 Color ownCategoryAxisLineColor = axisFormat.getOwnCategoryAxisLineColor();
1776 if (ownCategoryAxisLineColor != null)
1777 {
1778 return ownCategoryAxisLineColor;
1779 }
1780 return getForecolor(plot);
1781 }
1782
1783
1786 public Color getValueAxisLabelColor(JRValueAxisFormat axisFormat, JRChartPlot plot)
1787 {
1788 Color ownValueAxisLabelColor = axisFormat.getOwnValueAxisLabelColor();
1789 if (ownValueAxisLabelColor != null)
1790 {
1791 return ownValueAxisLabelColor;
1792 }
1793 return getForecolor(plot);
1794 }
1795
1796
1799 public Color getValueAxisTickLabelColor(JRValueAxisFormat axisFormat, JRChartPlot plot)
1800 {
1801 Color ownValueAxisTickLabelColor = axisFormat.getOwnValueAxisTickLabelColor();
1802 if (ownValueAxisTickLabelColor != null)
1803 {
1804 return ownValueAxisTickLabelColor;
1805 }
1806 return getForecolor(plot);
1807 }
1808
1809
1812 public Color getValueAxisLineColor(JRValueAxisFormat axisFormat, JRChartPlot plot)
1813 {
1814 Color ownValueAxisLineColor = axisFormat.getOwnValueAxisLineColor();
1815 if (ownValueAxisLineColor != null)
1816 {
1817 return ownValueAxisLineColor;
1818 }
1819 return getForecolor(plot);
1820 }
1821
1822
1825 public Color getXAxisLabelColor(JRXAxisFormat axisFormat, JRChartPlot plot)
1826 {
1827 Color ownXAxisLabelColor = axisFormat.getOwnXAxisLabelColor();
1828 if (ownXAxisLabelColor != null)
1829 {
1830 return ownXAxisLabelColor;
1831 }
1832 return getForecolor(plot);
1833 }
1834
1835
1838 public Color getXAxisTickLabelColor(JRXAxisFormat axisFormat, JRChartPlot plot)
1839 {
1840 Color ownXAxisTickLabelColor = axisFormat.getOwnXAxisTickLabelColor();
1841 if (ownXAxisTickLabelColor != null)
1842 {
1843 return ownXAxisTickLabelColor;
1844 }
1845 return getForecolor(plot);
1846 }
1847
1848
1851 public Color getXAxisLineColor(JRXAxisFormat axisFormat, JRChartPlot plot)
1852 {
1853 Color ownXAxisLineColor = axisFormat.getOwnXAxisLineColor();
1854 if (ownXAxisLineColor != null)
1855 {
1856 return ownXAxisLineColor;
1857 }
1858 return getForecolor(plot);
1859 }
1860
1861
1864 public Color getYAxisLabelColor(JRYAxisFormat axisFormat, JRChartPlot plot)
1865 {
1866 Color ownYAxisLabelColor = axisFormat.getOwnYAxisLabelColor();
1867 if (ownYAxisLabelColor != null)
1868 {
1869 return ownYAxisLabelColor;
1870 }
1871 return getForecolor(plot);
1872 }
1873
1874
1877 public Color getYAxisTickLabelColor(JRYAxisFormat axisFormat, JRChartPlot plot)
1878 {
1879 Color ownYAxisTickLabelColor = axisFormat.getOwnYAxisTickLabelColor();
1880 if (ownYAxisTickLabelColor != null)
1881 {
1882 return ownYAxisTickLabelColor;
1883 }
1884 return getForecolor(plot);
1885 }
1886
1887
1890 public Color getYAxisLineColor(JRYAxisFormat axisFormat, JRChartPlot plot)
1891 {
1892 Color ownYAxisLineColor = axisFormat.getOwnYAxisLineColor();
1893 if (ownYAxisLineColor != null)
1894 {
1895 return ownYAxisLineColor;
1896 }
1897 return getForecolor(plot);
1898 }
1899
1900
1903 public Color getTimeAxisLabelColor(JRTimeAxisFormat axisFormat, JRChartPlot plot)
1904 {
1905 Color ownTimeAxisLabelColor = axisFormat.getOwnTimeAxisLabelColor();
1906 if (ownTimeAxisLabelColor != null)
1907 {
1908 return ownTimeAxisLabelColor;
1909 }
1910 return getForecolor(plot);
1911 }
1912
1913
1916 public Color getTimeAxisTickLabelColor(JRTimeAxisFormat axisFormat, JRChartPlot plot)
1917 {
1918 Color ownTimeAxisTickLabelColor = axisFormat.getOwnTimeAxisTickLabelColor();
1919 if (ownTimeAxisTickLabelColor != null)
1920 {
1921 return ownTimeAxisTickLabelColor;
1922 }
1923 return getForecolor(plot);
1924 }
1925
1926
1929 public Color getTimeAxisLineColor(JRTimeAxisFormat axisFormat, JRChartPlot plot)
1930 {
1931 Color ownTimeAxisLineColor = axisFormat.getOwnTimeAxisLineColor();
1932 if (ownTimeAxisLineColor != null)
1933 {
1934 return ownTimeAxisLineColor;
1935 }
1936 return getForecolor(plot);
1937 }
1938 }
1939