KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > fill > JRFillImage


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.fill;
29
30 import java.awt.Color JavaDoc;
31 import java.awt.Image JavaDoc;
32 import java.io.File JavaDoc;
33 import java.io.IOException JavaDoc;
34 import java.io.InputStream JavaDoc;
35 import java.net.URL JavaDoc;
36
37 import net.sf.jasperreports.engine.JRAbstractObjectFactory;
38 import net.sf.jasperreports.engine.JRBox;
39 import net.sf.jasperreports.engine.JRChild;
40 import net.sf.jasperreports.engine.JRException;
41 import net.sf.jasperreports.engine.JRExpression;
42 import net.sf.jasperreports.engine.JRExpressionCollector;
43 import net.sf.jasperreports.engine.JRGroup;
44 import net.sf.jasperreports.engine.JRHyperlinkParameter;
45 import net.sf.jasperreports.engine.JRImage;
46 import net.sf.jasperreports.engine.JRImageRenderer;
47 import net.sf.jasperreports.engine.JRPrintElement;
48 import net.sf.jasperreports.engine.JRPrintHyperlinkParameters;
49 import net.sf.jasperreports.engine.JRPrintImage;
50 import net.sf.jasperreports.engine.JRRenderable;
51 import net.sf.jasperreports.engine.JRStyle;
52 import net.sf.jasperreports.engine.util.JRStyleResolver;
53 import net.sf.jasperreports.engine.xml.JRXmlWriter;
54
55
56 /**
57  * @author Teodor Danciu (teodord@users.sourceforge.net)
58  * @version $Id: JRFillImage.java 1417 2006-10-05 13:12:17 +0300 (Thu, 05 Oct 2006) lucianc $
59  */

60 public class JRFillImage extends JRFillGraphicElement implements JRImage
61 {
62
63
64     /**
65      *
66      */

67     private JRGroup evaluationGroup = null;
68
69     /**
70      *
71      */

72     private JRRenderable renderer = null;
73     private String JavaDoc anchorName = null;
74     private String JavaDoc hyperlinkReference = null;
75     private String JavaDoc hyperlinkAnchor = null;
76     private Integer JavaDoc hyperlinkPage = null;
77     private String JavaDoc hyperlinkTooltip;
78     private JRPrintHyperlinkParameters hyperlinkParameters;
79
80
81     /**
82      *
83      */

84     protected JRFillImage(
85         JRBaseFiller filler,
86         JRImage image,
87         JRFillObjectFactory factory
88         )
89     {
90         super(filler, image, factory);
91
92         evaluationGroup = factory.getGroup(image.getEvaluationGroup());
93     }
94
95
96     protected JRFillImage(JRFillImage image, JRFillCloneFactory factory)
97     {
98         super(image, factory);
99
100         evaluationGroup = image.evaluationGroup;
101     }
102
103
104     /**
105      *
106      */

107     public byte getMode()
108     {
109         return JRStyleResolver.getMode(this, MODE_TRANSPARENT);
110     }
111
112     /**
113      *
114      */

115     public byte getPen()
116     {
117         return JRStyleResolver.getPen(this, PEN_NONE);
118     }
119
120     /**
121      *
122      */

123     public byte getScaleImage()
124     {
125         return JRStyleResolver.getScaleImage(this);
126     }
127         
128     public Byte JavaDoc getOwnScaleImage()
129     {
130         return ((JRImage)this.parent).getOwnScaleImage();
131     }
132
133     /**
134      *
135      */

136     public void setScaleImage(byte scaleImage)
137     {
138     }
139
140     /**
141      *
142      */

143     public void setScaleImage(Byte JavaDoc scaleImage)
144     {
145     }
146
147     /**
148      *
149      */

150     public byte getHorizontalAlignment()
151     {
152         return JRStyleResolver.getHorizontalAlignment(this);
153     }
154         
155     public Byte JavaDoc getOwnHorizontalAlignment()
156     {
157         return ((JRImage)this.parent).getOwnHorizontalAlignment();
158     }
159
160     /**
161      *
162      */

163     public void setHorizontalAlignment(byte horizontalAlignment)
164     {
165     }
166         
167     /**
168      *
169      */

170     public void setHorizontalAlignment(Byte JavaDoc horizontalAlignment)
171     {
172     }
173         
174     /**
175      *
176      */

177     public byte getVerticalAlignment()
178     {
179         return JRStyleResolver.getVerticalAlignment(this);
180     }
181         
182     public Byte JavaDoc getOwnVerticalAlignment()
183     {
184         return ((JRImage)this.parent).getOwnVerticalAlignment();
185     }
186
187     /**
188      *
189      */

190     public void setVerticalAlignment(byte verticalAlignment)
191     {
192     }
193         
194     /**
195      *
196      */

197     public void setVerticalAlignment(Byte JavaDoc verticalAlignment)
198     {
199     }
200         
201     /**
202      *
203      */

204     public boolean isUsingCache()
205     {
206         return ((JRImage)this.parent).isUsingCache();
207     }
208         
209     /**
210      *
211      */

212     public Boolean JavaDoc isOwnUsingCache()
213     {
214         return ((JRImage)this.parent).isOwnUsingCache();
215     }
216         
217     /**
218      *
219      */

220     public void setUsingCache(boolean isUsingCache)
221     {
222     }
223         
224     /**
225      *
226      */

227     public void setUsingCache(Boolean JavaDoc isUsingCache)
228     {
229     }
230         
231     /**
232      *
233      */

234     public boolean isLazy()
235     {
236         return ((JRImage)this.parent).isLazy();
237     }
238         
239     /**
240      *
241      */

242     public void setLazy(boolean isLazy)
243     {
244     }
245
246     /**
247      *
248      */

249     public byte getOnErrorType()
250     {
251         return ((JRImage)this.parent).getOnErrorType();
252     }
253         
254     /**
255      *
256      */

257     public void setOnErrorType(byte onErrorType)
258     {
259     }
260
261     /**
262      *
263      */

264     public byte getEvaluationTime()
265     {
266         return ((JRImage)this.parent).getEvaluationTime();
267     }
268         
269     /**
270      *
271      */

272     public JRGroup getEvaluationGroup()
273     {
274         return this.evaluationGroup;
275     }
276         
277     /**
278      * @deprecated
279      */

280     public JRBox getBox()
281     {
282         return this;
283     }
284
285     /**
286      *
287      */

288     public byte getHyperlinkType()
289     {
290         return ((JRImage)this.parent).getHyperlinkType();
291     }
292         
293     /**
294      *
295      */

296     public byte getHyperlinkTarget()
297     {
298         return ((JRImage)this.parent).getHyperlinkTarget();
299     }
300         
301     /**
302      *
303      */

304     public JRExpression getExpression()
305     {
306         return ((JRImage)this.parent).getExpression();
307     }
308
309     /**
310      *
311      */

312     public JRExpression getAnchorNameExpression()
313     {
314         return ((JRImage)this.parent).getAnchorNameExpression();
315     }
316
317     /**
318      *
319      */

320     public JRExpression getHyperlinkReferenceExpression()
321     {
322         return ((JRImage)this.parent).getHyperlinkReferenceExpression();
323     }
324
325     /**
326      *
327      */

328     public JRExpression getHyperlinkAnchorExpression()
329     {
330         return ((JRImage)this.parent).getHyperlinkAnchorExpression();
331     }
332
333     /**
334      *
335      */

336     public JRExpression getHyperlinkPageExpression()
337     {
338         return ((JRImage)this.parent).getHyperlinkPageExpression();
339     }
340
341         
342     /**
343      *
344      */

345     protected JRRenderable getRenderer()
346     {
347         return this.renderer;
348     }
349         
350     /**
351      *
352      */

353     protected String JavaDoc getAnchorName()
354     {
355         return this.anchorName;
356     }
357
358     /**
359      *
360      */

361     protected String JavaDoc getHyperlinkReference()
362     {
363         return this.hyperlinkReference;
364     }
365
366     /**
367      *
368      */

369     protected String JavaDoc getHyperlinkAnchor()
370     {
371         return this.hyperlinkAnchor;
372     }
373
374     /**
375      *
376      */

377     protected Integer JavaDoc getHyperlinkPage()
378     {
379         return this.hyperlinkPage;
380     }
381         
382
383     protected String JavaDoc getHyperlinkTooltip()
384     {
385         return this.hyperlinkTooltip;
386     }
387         
388
389     /**
390      *
391      */

392     protected JRTemplateImage getJRTemplateImage()
393     {
394         JRStyle style = getStyle();
395         JRTemplateImage template = (JRTemplateImage) getTemplate(style);
396         if (template == null)
397         {
398             template = new JRTemplateImage(filler.getJasperPrint().getDefaultStyleProvider(), this);
399             registerTemplate(style, template);
400         }
401         return template;
402     }
403
404
405     /**
406      *
407      */

408     protected void evaluate(
409         byte evaluation
410         ) throws JRException
411     {
412         initDelayedEvaluations();
413         
414         this.reset();
415         
416         this.evaluatePrintWhenExpression(evaluation);
417
418         if (
419             (this.isPrintWhenExpressionNull() ||
420             (!this.isPrintWhenExpressionNull() &&
421             this.isPrintWhenTrue()))
422             )
423         {
424             if (isEvaluateNow())
425             {
426                 this.evaluateImage(evaluation);
427             }
428         }
429     }
430     
431
432     /**
433      *
434      */

435     protected void evaluateImage(
436         byte evaluation
437         ) throws JRException
438     {
439         JRExpression expression = this.getExpression();
440
441         JRRenderable newRenderer = null;
442         
443         Object JavaDoc source = evaluateExpression(expression, evaluation);
444         if (source != null)
445         {
446             if (this.isUsingCache() && this.filler.fillContext.hasLoadedImage(source))
447             {
448                 newRenderer = this.filler.fillContext.getLoadedImage(source).getRenderer();
449             }
450             else
451             {
452                 Class JavaDoc expressionClass = expression.getValueClass();
453                 
454                 if (Image JavaDoc.class.getName().equals(expressionClass.getName()))
455                 {
456                     Image JavaDoc img = (Image JavaDoc) source;
457                     newRenderer = JRImageRenderer.getInstance(img, getOnErrorType());
458                 }
459                 else if (InputStream JavaDoc.class.getName().equals(expressionClass.getName()))
460                 {
461                     InputStream JavaDoc is = (InputStream JavaDoc) source;
462                     newRenderer = JRImageRenderer.getInstance(is, getOnErrorType());
463                 }
464                 else if (URL JavaDoc.class.getName().equals(expressionClass.getName()))
465                 {
466                     URL JavaDoc url = (URL JavaDoc) source;
467                     newRenderer = JRImageRenderer.getInstance(url, getOnErrorType());
468                 }
469                 else if (File JavaDoc.class.getName().equals(expressionClass.getName()))
470                 {
471                     File JavaDoc file = (File JavaDoc) source;
472                     newRenderer = JRImageRenderer.getInstance(file, getOnErrorType());
473                 }
474                 else if (String JavaDoc.class.getName().equals(expressionClass.getName()))
475                 {
476                     String JavaDoc location = (String JavaDoc) source;
477                     newRenderer = JRImageRenderer.getInstance(location, getOnErrorType(), isLazy(), filler.reportClassLoader,
478                             filler.urlHandlerFactory);
479                 }
480                 else if (JRRenderable.class.getName().equals(expressionClass.getName()))
481                 {
482                     newRenderer = (JRRenderable) source;
483                 }
484
485                 if (this.isUsingCache())
486                 {
487                     JRPrintImage img = new JRTemplatePrintImage(this.getJRTemplateImage());
488                     img.setRenderer(newRenderer);
489                     this.filler.fillContext.registerLoadedImage(source, img);
490                 }
491             }
492         }
493
494         setValueRepeating(this.renderer == newRenderer);
495     
496         this.renderer = newRenderer;
497         
498         this.anchorName = (String JavaDoc) evaluateExpression(this.getAnchorNameExpression(), evaluation);
499         this.hyperlinkReference = (String JavaDoc) evaluateExpression(this.getHyperlinkReferenceExpression(), evaluation);
500         this.hyperlinkAnchor = (String JavaDoc) evaluateExpression(this.getHyperlinkAnchorExpression(), evaluation);
501         this.hyperlinkPage = (Integer JavaDoc) evaluateExpression(this.getHyperlinkPageExpression(), evaluation);
502         this.hyperlinkTooltip = (String JavaDoc) evaluateExpression(this.getHyperlinkTooltipExpression(), evaluation);
503         hyperlinkParameters = JRFillHyperlinkHelper.evaluateHyperlinkParameters(this, expressionEvaluator, evaluation);
504     }
505     
506
507     /**
508      *
509      */

510     protected boolean prepare(
511         int availableStretchHeight,
512         boolean isOverflow
513         )
514     {
515         boolean willOverflow = false;
516
517         if (
518             this.isPrintWhenExpressionNull() ||
519             ( !this.isPrintWhenExpressionNull() &&
520             this.isPrintWhenTrue() )
521             )
522         {
523             this.setToPrint(true);
524         }
525         else
526         {
527             this.setToPrint(false);
528         }
529
530         if (!this.isToPrint())
531         {
532             return willOverflow;
533         }
534         
535         boolean isToPrint = true;
536         boolean isReprinted = false;
537
538         if (isEvaluateNow())
539         {
540             if (isOverflow && this.isAlreadyPrinted() && !this.isPrintWhenDetailOverflows())
541             {
542                 isToPrint = false;
543             }
544     
545             if (
546                 isToPrint &&
547                 this.isPrintWhenExpressionNull() &&
548                 !this.isPrintRepeatedValues() &&
549                 isValueRepeating()
550                 )
551             {
552                 if (
553                     ( !this.isPrintInFirstWholeBand() || !this.getBand().isFirstWholeOnPageColumn() ) &&
554                     ( this.getPrintWhenGroupChanges() == null || !this.getBand().isNewGroup(this.getPrintWhenGroupChanges()) ) &&
555                     ( !isOverflow || !this.isPrintWhenDetailOverflows() )
556                     )
557                 {
558                     isToPrint = false;
559                 }
560             }
561     
562             if (
563                 isToPrint &&
564                 availableStretchHeight < this.getRelativeY() - this.getY() - this.getBandBottomY()
565                 )
566             {
567                 isToPrint = false;
568                 willOverflow = true;
569             }
570             
571             if (
572                 isToPrint &&
573                 isOverflow &&
574                 //(this.isAlreadyPrinted() || !this.isPrintRepeatedValues())
575
(this.isPrintWhenDetailOverflows() && (this.isAlreadyPrinted() || (!this.isAlreadyPrinted() && !this.isPrintRepeatedValues())))
576                 )
577             {
578                 isReprinted = true;
579             }
580
581             if (
582                 isToPrint &&
583                 this.isRemoveLineWhenBlank() &&
584                 this.getRenderer() == null
585                 )
586             {
587                 isToPrint = false;
588             }
589         }
590         else
591         {
592             if (isOverflow && this.isAlreadyPrinted() && !this.isPrintWhenDetailOverflows())
593             {
594                 isToPrint = false;
595             }
596     
597             if (
598                 isToPrint &&
599                 availableStretchHeight < this.getRelativeY() - this.getY() - this.getBandBottomY()
600                 )
601             {
602                 isToPrint = false;
603                 willOverflow = true;
604             }
605             
606             if (
607                 isToPrint &&
608                 isOverflow &&
609                 //(this.isAlreadyPrinted() || !this.isPrintRepeatedValues())
610
(this.isPrintWhenDetailOverflows() && (this.isAlreadyPrinted() || (!this.isAlreadyPrinted() && !this.isPrintRepeatedValues())))
611                 )
612             {
613                 isReprinted = true;
614             }
615         }
616
617         this.setToPrint(isToPrint);
618         this.setReprinted(isReprinted);
619         
620         return willOverflow;
621     }
622
623
624     /**
625      *
626      */

627     protected JRPrintElement fill() throws JRException
628     {
629         byte evaluationType = this.getEvaluationTime();
630         JRTemplatePrintImage printImage;
631         JRRecordedValuesPrintImage recordedValuesImage;
632         if (isEvaluateAuto())
633         {
634             printImage = recordedValuesImage = new JRRecordedValuesPrintImage(getJRTemplateImage());
635         }
636         else
637         {
638             printImage = new JRTemplatePrintImage(getJRTemplateImage());
639             recordedValuesImage = null;
640         }
641         
642         printImage.setX(this.getX());
643         printImage.setY(this.getRelativeY());
644         printImage.setWidth(getWidth());
645         printImage.setHeight(this.getStretchHeight());
646
647         if (isEvaluateNow())
648         {
649             this.copy(printImage);
650         }
651         else if (isEvaluateAuto())
652         {
653             initDelayedEvaluationPrint(recordedValuesImage);
654         }
655         else
656         {
657             filler.addBoundElement(this, printImage, evaluationType, getEvaluationGroup(), band);
658         }
659         
660         return printImage;
661     }
662         
663
664     /**
665      *
666      */

667     protected void copy(JRPrintImage printImage)
668     {
669         printImage.setRenderer(
670             this.getRenderer()
671             );
672         printImage.setAnchorName(this.getAnchorName());
673         printImage.setHyperlinkReference(this.getHyperlinkReference());
674         printImage.setHyperlinkAnchor(this.getHyperlinkAnchor());
675         printImage.setHyperlinkPage(this.getHyperlinkPage());
676         printImage.setHyperlinkTooltip(getHyperlinkTooltip());
677         printImage.setBookmarkLevel(this.getBookmarkLevel());
678         printImage.setHyperlinkParameters(hyperlinkParameters);
679     }
680
681
682     /**
683      *
684      */

685     public JRChild getCopy(JRAbstractObjectFactory factory)
686     {
687         return factory.getImage(this);
688     }
689
690     /**
691      *
692      */

693     public void collectExpressions(JRExpressionCollector collector)
694     {
695         collector.collect(this);
696     }
697
698     /**
699      *
700      */

701     public void writeXml(JRXmlWriter xmlWriter) throws IOException JavaDoc
702     {
703         xmlWriter.writeImage(this);
704     }
705
706
707     protected void resolveElement(JRPrintElement element, byte evaluation) throws JRException
708     {
709         evaluateImage(evaluation);
710
711         copy((JRPrintImage) element);
712     }
713
714
715     public int getBookmarkLevel()
716     {
717         return ((JRImage)this.parent).getBookmarkLevel();
718     }
719
720     /**
721      *
722      */

723     public byte getBorder()
724     {
725         return JRStyleResolver.getBorder(this);
726     }
727
728     public Byte JavaDoc getOwnBorder()
729     {
730         return ((JRBox)parent).getOwnBorder();
731     }
732
733     /**
734      *
735      */

736     public void setBorder(byte border)
737     {
738     }
739
740     /**
741      *
742      */

743     public Color JavaDoc getBorderColor()
744     {
745         return JRStyleResolver.getBorderColor(this, getForecolor());
746     }
747
748     public Color JavaDoc getOwnBorderColor()
749     {
750         return ((JRBox)parent).getOwnBorderColor();
751     }
752
753     /**
754      *
755      */

756     public void setBorderColor(Color JavaDoc borderColor)
757     {
758     }
759
760     /**
761      *
762      */

763     public int getPadding()
764     {
765         return JRStyleResolver.getPadding(this);
766     }
767
768     public Integer JavaDoc getOwnPadding()
769     {
770         return ((JRBox)parent).getOwnPadding();
771     }
772
773     /**
774      *
775      */

776     public void setPadding(int padding)
777     {
778     }
779
780     /**
781      *
782      */

783     public byte getTopBorder()
784     {
785         return JRStyleResolver.getTopBorder(this);
786     }
787
788     /**
789      *
790      */

791     public Byte JavaDoc getOwnTopBorder()
792     {
793         return ((JRBox)parent).getOwnTopBorder();
794     }
795
796     /**
797      *
798      */

799     public void setTopBorder(byte topBorder)
800     {
801     }
802
803     /**
804      *
805      */

806     public Color JavaDoc getTopBorderColor()
807     {
808         return JRStyleResolver.getTopBorderColor(this, getForecolor());
809     }
810
811     /**
812      *
813      */

814     public Color JavaDoc getOwnTopBorderColor()
815     {
816         return ((JRBox)parent).getOwnTopBorderColor();
817     }
818
819     /**
820      *
821      */

822     public void setTopBorderColor(Color JavaDoc topBorderColor)
823     {
824     }
825
826     /**
827      *
828      */

829     public int getTopPadding()
830     {
831         return JRStyleResolver.getTopPadding(this);
832     }
833
834     /**
835      *
836      */

837     public Integer JavaDoc getOwnTopPadding()
838     {
839         return ((JRBox)parent).getOwnTopPadding();
840     }
841
842     /**
843      *
844      */

845     public void setTopPadding(int topPadding)
846     {
847     }
848
849     /**
850      *
851      */

852     public byte getLeftBorder()
853     {
854         return JRStyleResolver.getLeftBorder(this);
855     }
856
857     /**
858      *
859      */

860     public Byte JavaDoc getOwnLeftBorder()
861     {
862         return ((JRBox)parent).getOwnLeftBorder();
863     }
864
865     /**
866      *
867      */

868     public void setLeftBorder(byte leftBorder)
869     {
870     }
871
872     /**
873      *
874      */

875     public Color JavaDoc getLeftBorderColor()
876     {
877         return JRStyleResolver.getLeftBorderColor(this, getForecolor());
878     }
879
880     /**
881      *
882      */

883     public Color JavaDoc getOwnLeftBorderColor()
884     {
885         return ((JRBox)parent).getOwnLeftBorderColor();
886     }
887
888     /**
889      *
890      */

891     public void setLeftBorderColor(Color JavaDoc leftBorderColor)
892     {
893     }
894
895     /**
896      *
897      */

898     public int getLeftPadding()
899     {
900         return JRStyleResolver.getLeftPadding(this);
901     }
902
903     /**
904      *
905      */

906     public Integer JavaDoc getOwnLeftPadding()
907     {
908         return ((JRBox)parent).getOwnLeftPadding();
909     }
910
911     /**
912      *
913      */

914     public void setLeftPadding(int leftPadding)
915     {
916     }
917
918     /**
919      *
920      */

921     public byte getBottomBorder()
922     {
923         return JRStyleResolver.getBottomBorder(this);
924     }
925
926     /**
927      *
928      */

929     public Byte JavaDoc getOwnBottomBorder()
930     {
931         return ((JRBox)parent).getOwnBottomBorder();
932     }
933
934     /**
935      *
936      */

937     public void setBottomBorder(byte bottomBorder)
938     {
939     }
940
941     /**
942      *
943      */

944     public Color JavaDoc getBottomBorderColor()
945     {
946         return JRStyleResolver.getBottomBorderColor(this, getForecolor());
947     }
948
949     /**
950      *
951      */

952     public Color JavaDoc getOwnBottomBorderColor()
953     {
954         return ((JRBox)parent).getOwnBottomBorderColor();
955     }
956
957     /**
958      *
959      */

960     public void setBottomBorderColor(Color JavaDoc bottomBorderColor)
961     {
962     }
963
964     /**
965      *
966      */

967     public int getBottomPadding()
968     {
969         return JRStyleResolver.getBottomPadding(this);
970     }
971
972     /**
973      *
974      */

975     public Integer JavaDoc getOwnBottomPadding()
976     {
977         return ((JRBox)parent).getOwnBottomPadding();
978     }
979
980     /**
981      *
982      */

983     public void setBottomPadding(int bottomPadding)
984     {
985     }
986
987     /**
988      *
989      */

990     public byte getRightBorder()
991     {
992         return JRStyleResolver.getRightBorder(this);
993     }
994
995     /**
996      *
997      */

998     public Byte JavaDoc getOwnRightBorder()
999     {
1000        return ((JRBox)parent).getOwnRightBorder();
1001    }
1002
1003    /**
1004     *
1005     */

1006    public void setRightBorder(byte rightBorder)
1007    {
1008    }
1009
1010    /**
1011     *
1012     */

1013    public Color JavaDoc getRightBorderColor()
1014    {
1015        return JRStyleResolver.getRightBorderColor(this, getForecolor());
1016    }
1017
1018    /**
1019     *
1020     */

1021    public Color JavaDoc getOwnRightBorderColor()
1022    {
1023        return ((JRBox)parent).getOwnRightBorderColor();
1024    }
1025
1026    /**
1027     *
1028     */

1029    public void setRightBorderColor(Color JavaDoc rightBorderColor)
1030    {
1031    }
1032
1033    /**
1034     *
1035     */

1036    public int getRightPadding()
1037    {
1038        return JRStyleResolver.getRightPadding(this);
1039    }
1040
1041    /**
1042     *
1043     */

1044    public Integer JavaDoc getOwnRightPadding()
1045    {
1046        return ((JRBox)parent).getOwnRightPadding();
1047    }
1048
1049    /**
1050     *
1051     */

1052    public void setRightPadding(int rightPadding)
1053    {
1054    }
1055    
1056    /**
1057     *
1058     */

1059    public void setBorder(Byte JavaDoc border)
1060    {
1061    }
1062
1063    /**
1064     *
1065     */

1066    public void setPadding(Integer JavaDoc padding)
1067    {
1068    }
1069
1070    /**
1071     *
1072     */

1073    public void setTopBorder(Byte JavaDoc topBorder)
1074    {
1075    }
1076
1077    /**
1078     *
1079     */

1080    public void setTopPadding(Integer JavaDoc topPadding)
1081    {
1082    }
1083
1084    /**
1085     *
1086     */

1087    public void setLeftBorder(Byte JavaDoc leftBorder)
1088    {
1089    }
1090
1091    /**
1092     *
1093     */

1094    public void setLeftPadding(Integer JavaDoc leftPadding)
1095    {
1096    }
1097
1098    /**
1099     *
1100     */

1101    public void setBottomBorder(Byte JavaDoc bottomBorder)
1102    {
1103    }
1104
1105    /**
1106     *
1107     */

1108    public void setBottomPadding(Integer JavaDoc bottomPadding)
1109    {
1110    }
1111
1112    /**
1113     *
1114     */

1115    public void setRightBorder(Byte JavaDoc rightBorder)
1116    {
1117    }
1118
1119    /**
1120     *
1121     */

1122    public void setRightPadding(Integer JavaDoc rightPadding)
1123    {
1124    }
1125
1126
1127    public JRCloneable createClone(JRFillCloneFactory factory)
1128    {
1129        return new JRFillImage(this, factory);
1130    }
1131    
1132    protected void collectDelayedEvaluations()
1133    {
1134        collectDelayedEvaluations(getExpression());
1135        collectDelayedEvaluations(getAnchorNameExpression());
1136        collectDelayedEvaluations(getHyperlinkReferenceExpression());
1137        collectDelayedEvaluations(getHyperlinkAnchorExpression());
1138        collectDelayedEvaluations(getHyperlinkPageExpression());
1139    }
1140
1141
1142    public JRHyperlinkParameter[] getHyperlinkParameters()
1143    {
1144        return ((JRImage) parent).getHyperlinkParameters();
1145    }
1146
1147
1148    public String JavaDoc getLinkType()
1149    {
1150        return ((JRImage) parent).getLinkType();
1151    }
1152
1153
1154    public JRExpression getHyperlinkTooltipExpression()
1155    {
1156        return ((JRImage) parent).getHyperlinkTooltipExpression();
1157    }
1158
1159}
1160
Popular Tags