001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.engine.fill;
029:
030: import java.awt.Color;
031: import java.awt.Image;
032: import java.io.File;
033: import java.io.IOException;
034: import java.io.InputStream;
035: import java.net.URL;
036:
037: import net.sf.jasperreports.engine.JRAbstractObjectFactory;
038: import net.sf.jasperreports.engine.JRBox;
039: import net.sf.jasperreports.engine.JRChild;
040: import net.sf.jasperreports.engine.JRException;
041: import net.sf.jasperreports.engine.JRExpression;
042: import net.sf.jasperreports.engine.JRExpressionCollector;
043: import net.sf.jasperreports.engine.JRGroup;
044: import net.sf.jasperreports.engine.JRHyperlinkParameter;
045: import net.sf.jasperreports.engine.JRImage;
046: import net.sf.jasperreports.engine.JRImageRenderer;
047: import net.sf.jasperreports.engine.JRPrintElement;
048: import net.sf.jasperreports.engine.JRPrintHyperlinkParameters;
049: import net.sf.jasperreports.engine.JRPrintImage;
050: import net.sf.jasperreports.engine.JRRenderable;
051: import net.sf.jasperreports.engine.JRStyle;
052: import net.sf.jasperreports.engine.util.JRStyleResolver;
053: import net.sf.jasperreports.engine.xml.JRXmlWriter;
054:
055: /**
056: * @author Teodor Danciu (teodord@users.sourceforge.net)
057: * @version $Id: JRFillImage.java 1710 2007-04-26 16:39:17Z teodord $
058: */
059: public class JRFillImage extends JRFillGraphicElement implements
060: JRImage {
061:
062: /**
063: *
064: */
065: private JRGroup evaluationGroup = null;
066:
067: /**
068: *
069: */
070: private JRRenderable renderer = null;
071: private String anchorName = null;
072: private String hyperlinkReference = null;
073: private String hyperlinkAnchor = null;
074: private Integer hyperlinkPage = null;
075: private String hyperlinkTooltip;
076: private JRPrintHyperlinkParameters hyperlinkParameters;
077:
078: /**
079: *
080: */
081: protected JRFillImage(JRBaseFiller filler, JRImage image,
082: JRFillObjectFactory factory) {
083: super (filler, image, factory);
084:
085: evaluationGroup = factory.getGroup(image.getEvaluationGroup());
086: }
087:
088: protected JRFillImage(JRFillImage image, JRFillCloneFactory factory) {
089: super (image, factory);
090:
091: evaluationGroup = image.evaluationGroup;
092: }
093:
094: /**
095: *
096: */
097: public byte getMode() {
098: return JRStyleResolver.getMode(this , MODE_TRANSPARENT);
099: }
100:
101: /**
102: *
103: */
104: public byte getPen() {
105: return JRStyleResolver.getPen(this , PEN_NONE);
106: }
107:
108: /**
109: *
110: */
111: public byte getScaleImage() {
112: return JRStyleResolver.getScaleImage(this );
113: }
114:
115: public Byte getOwnScaleImage() {
116: return ((JRImage) this .parent).getOwnScaleImage();
117: }
118:
119: /**
120: *
121: */
122: public void setScaleImage(byte scaleImage) {
123: }
124:
125: /**
126: *
127: */
128: public void setScaleImage(Byte scaleImage) {
129: }
130:
131: /**
132: *
133: */
134: public byte getHorizontalAlignment() {
135: return JRStyleResolver.getHorizontalAlignment(this );
136: }
137:
138: public Byte getOwnHorizontalAlignment() {
139: return ((JRImage) this .parent).getOwnHorizontalAlignment();
140: }
141:
142: /**
143: *
144: */
145: public void setHorizontalAlignment(byte horizontalAlignment) {
146: }
147:
148: /**
149: *
150: */
151: public void setHorizontalAlignment(Byte horizontalAlignment) {
152: }
153:
154: /**
155: *
156: */
157: public byte getVerticalAlignment() {
158: return JRStyleResolver.getVerticalAlignment(this );
159: }
160:
161: public Byte getOwnVerticalAlignment() {
162: return ((JRImage) this .parent).getOwnVerticalAlignment();
163: }
164:
165: /**
166: *
167: */
168: public void setVerticalAlignment(byte verticalAlignment) {
169: }
170:
171: /**
172: *
173: */
174: public void setVerticalAlignment(Byte verticalAlignment) {
175: }
176:
177: /**
178: *
179: */
180: public boolean isUsingCache() {
181: return ((JRImage) this .parent).isUsingCache();
182: }
183:
184: /**
185: *
186: */
187: public Boolean isOwnUsingCache() {
188: return ((JRImage) this .parent).isOwnUsingCache();
189: }
190:
191: /**
192: *
193: */
194: public void setUsingCache(boolean isUsingCache) {
195: }
196:
197: /**
198: *
199: */
200: public void setUsingCache(Boolean isUsingCache) {
201: }
202:
203: /**
204: *
205: */
206: public boolean isLazy() {
207: return ((JRImage) this .parent).isLazy();
208: }
209:
210: /**
211: *
212: */
213: public void setLazy(boolean isLazy) {
214: }
215:
216: /**
217: *
218: */
219: public byte getOnErrorType() {
220: return ((JRImage) this .parent).getOnErrorType();
221: }
222:
223: /**
224: *
225: */
226: public void setOnErrorType(byte onErrorType) {
227: }
228:
229: /**
230: *
231: */
232: public byte getEvaluationTime() {
233: return ((JRImage) this .parent).getEvaluationTime();
234: }
235:
236: /**
237: *
238: */
239: public JRGroup getEvaluationGroup() {
240: return this .evaluationGroup;
241: }
242:
243: /**
244: * @deprecated
245: */
246: public JRBox getBox() {
247: return this ;
248: }
249:
250: /**
251: *
252: */
253: public byte getHyperlinkType() {
254: return ((JRImage) this .parent).getHyperlinkType();
255: }
256:
257: /**
258: *
259: */
260: public byte getHyperlinkTarget() {
261: return ((JRImage) this .parent).getHyperlinkTarget();
262: }
263:
264: /**
265: *
266: */
267: public JRExpression getExpression() {
268: return ((JRImage) this .parent).getExpression();
269: }
270:
271: /**
272: *
273: */
274: public JRExpression getAnchorNameExpression() {
275: return ((JRImage) this .parent).getAnchorNameExpression();
276: }
277:
278: /**
279: *
280: */
281: public JRExpression getHyperlinkReferenceExpression() {
282: return ((JRImage) this .parent)
283: .getHyperlinkReferenceExpression();
284: }
285:
286: /**
287: *
288: */
289: public JRExpression getHyperlinkAnchorExpression() {
290: return ((JRImage) this .parent).getHyperlinkAnchorExpression();
291: }
292:
293: /**
294: *
295: */
296: public JRExpression getHyperlinkPageExpression() {
297: return ((JRImage) this .parent).getHyperlinkPageExpression();
298: }
299:
300: /**
301: *
302: */
303: protected JRRenderable getRenderer() {
304: return this .renderer;
305: }
306:
307: /**
308: *
309: */
310: protected String getAnchorName() {
311: return this .anchorName;
312: }
313:
314: /**
315: *
316: */
317: protected String getHyperlinkReference() {
318: return this .hyperlinkReference;
319: }
320:
321: /**
322: *
323: */
324: protected String getHyperlinkAnchor() {
325: return this .hyperlinkAnchor;
326: }
327:
328: /**
329: *
330: */
331: protected Integer getHyperlinkPage() {
332: return this .hyperlinkPage;
333: }
334:
335: protected String getHyperlinkTooltip() {
336: return this .hyperlinkTooltip;
337: }
338:
339: /**
340: *
341: */
342: protected JRTemplateImage getJRTemplateImage() {
343: JRStyle style = getStyle();
344: JRTemplateImage template = (JRTemplateImage) getTemplate(style);
345: if (template == null) {
346: template = new JRTemplateImage(filler.getJasperPrint()
347: .getDefaultStyleProvider(), this );
348: registerTemplate(style, template);
349: }
350: return template;
351: }
352:
353: /**
354: *
355: */
356: protected void evaluate(byte evaluation) throws JRException {
357: initDelayedEvaluations();
358:
359: this .reset();
360:
361: this .evaluatePrintWhenExpression(evaluation);
362:
363: if ((this .isPrintWhenExpressionNull() || (!this
364: .isPrintWhenExpressionNull() && this .isPrintWhenTrue()))) {
365: if (isEvaluateNow()) {
366: this .evaluateImage(evaluation);
367: }
368: }
369: }
370:
371: /**
372: *
373: */
374: protected void evaluateImage(byte evaluation) throws JRException {
375: JRExpression expression = this .getExpression();
376:
377: JRRenderable newRenderer = null;
378:
379: Object source = evaluateExpression(expression, evaluation);
380: if (source != null) {
381: if (isUsingCache()
382: && filler.fillContext.hasLoadedImage(source)) {
383: newRenderer = filler.fillContext.getLoadedImage(source)
384: .getRenderer();
385: } else {
386: Class expressionClass = expression.getValueClass();
387:
388: if (Image.class.getName().equals(
389: expressionClass.getName())) {
390: Image img = (Image) source;
391: newRenderer = JRImageRenderer.getInstance(img,
392: getOnErrorType());
393: } else if (InputStream.class.getName().equals(
394: expressionClass.getName())) {
395: InputStream is = (InputStream) source;
396: newRenderer = JRImageRenderer.getInstance(is,
397: getOnErrorType());
398: } else if (URL.class.getName().equals(
399: expressionClass.getName())) {
400: URL url = (URL) source;
401: newRenderer = JRImageRenderer.getInstance(url,
402: getOnErrorType());
403: } else if (File.class.getName().equals(
404: expressionClass.getName())) {
405: File file = (File) source;
406: newRenderer = JRImageRenderer.getInstance(file,
407: getOnErrorType());
408: } else if (String.class.getName().equals(
409: expressionClass.getName())) {
410: String location = (String) source;
411: newRenderer = JRImageRenderer.getInstance(location,
412: getOnErrorType(), isLazy(),
413: filler.reportClassLoader,
414: filler.urlHandlerFactory);
415: } else if (JRRenderable.class.getName().equals(
416: expressionClass.getName())) {
417: newRenderer = (JRRenderable) source;
418: }
419:
420: if (isUsingCache()) {
421: JRPrintImage img = new JRTemplatePrintImage(
422: getJRTemplateImage());
423: img.setRenderer(newRenderer);
424: filler.fillContext.registerLoadedImage(source, img);
425: }
426: }
427: }
428:
429: setValueRepeating(this .renderer == newRenderer);
430:
431: this .renderer = newRenderer;
432:
433: this .anchorName = (String) evaluateExpression(this
434: .getAnchorNameExpression(), evaluation);
435: this .hyperlinkReference = (String) evaluateExpression(this
436: .getHyperlinkReferenceExpression(), evaluation);
437: this .hyperlinkAnchor = (String) evaluateExpression(this
438: .getHyperlinkAnchorExpression(), evaluation);
439: this .hyperlinkPage = (Integer) evaluateExpression(this
440: .getHyperlinkPageExpression(), evaluation);
441: this .hyperlinkTooltip = (String) evaluateExpression(this
442: .getHyperlinkTooltipExpression(), evaluation);
443: hyperlinkParameters = JRFillHyperlinkHelper
444: .evaluateHyperlinkParameters(this , expressionEvaluator,
445: evaluation);
446: }
447:
448: /**
449: *
450: */
451: protected boolean prepare(int availableStretchHeight,
452: boolean isOverflow) {
453: boolean willOverflow = false;
454:
455: if (this .isPrintWhenExpressionNull()
456: || (!this .isPrintWhenExpressionNull() && this
457: .isPrintWhenTrue())) {
458: this .setToPrint(true);
459: } else {
460: this .setToPrint(false);
461: }
462:
463: if (!this .isToPrint()) {
464: return willOverflow;
465: }
466:
467: boolean isToPrint = true;
468: boolean isReprinted = false;
469:
470: if (isEvaluateNow()) {
471: if (isOverflow && this .isAlreadyPrinted()
472: && !this .isPrintWhenDetailOverflows()) {
473: isToPrint = false;
474: }
475:
476: if (isToPrint && this .isPrintWhenExpressionNull()
477: && !this .isPrintRepeatedValues()
478: && isValueRepeating()) {
479: if ((!this .isPrintInFirstWholeBand() || !this .getBand()
480: .isFirstWholeOnPageColumn())
481: && (this .getPrintWhenGroupChanges() == null || !this
482: .getBand()
483: .isNewGroup(
484: this .getPrintWhenGroupChanges()))
485: && (!isOverflow || !this
486: .isPrintWhenDetailOverflows())) {
487: isToPrint = false;
488: }
489: }
490:
491: if (isToPrint
492: && availableStretchHeight < this .getRelativeY()
493: - this .getY() - this .getBandBottomY()) {
494: isToPrint = false;
495: willOverflow = true;
496: }
497:
498: if (isToPrint
499: && isOverflow
500: &&
501: //(this.isAlreadyPrinted() || !this.isPrintRepeatedValues())
502: (this .isPrintWhenDetailOverflows() && (this
503: .isAlreadyPrinted() || (!this
504: .isAlreadyPrinted() && !this
505: .isPrintRepeatedValues())))) {
506: isReprinted = true;
507: }
508:
509: if (isToPrint && this .isRemoveLineWhenBlank()
510: && this .getRenderer() == null) {
511: isToPrint = false;
512: }
513: } else {
514: if (isOverflow && this .isAlreadyPrinted()
515: && !this .isPrintWhenDetailOverflows()) {
516: isToPrint = false;
517: }
518:
519: if (isToPrint
520: && availableStretchHeight < this .getRelativeY()
521: - this .getY() - this .getBandBottomY()) {
522: isToPrint = false;
523: willOverflow = true;
524: }
525:
526: if (isToPrint
527: && isOverflow
528: &&
529: //(this.isAlreadyPrinted() || !this.isPrintRepeatedValues())
530: (this .isPrintWhenDetailOverflows() && (this
531: .isAlreadyPrinted() || (!this
532: .isAlreadyPrinted() && !this
533: .isPrintRepeatedValues())))) {
534: isReprinted = true;
535: }
536: }
537:
538: this .setToPrint(isToPrint);
539: this .setReprinted(isReprinted);
540:
541: return willOverflow;
542: }
543:
544: /**
545: *
546: */
547: protected JRPrintElement fill() throws JRException {
548: byte evaluationType = this .getEvaluationTime();
549: JRTemplatePrintImage printImage;
550: JRRecordedValuesPrintImage recordedValuesImage;
551: if (isEvaluateAuto()) {
552: printImage = recordedValuesImage = new JRRecordedValuesPrintImage(
553: getJRTemplateImage());
554: } else {
555: printImage = new JRTemplatePrintImage(getJRTemplateImage());
556: recordedValuesImage = null;
557: }
558:
559: printImage.setX(this .getX());
560: printImage.setY(this .getRelativeY());
561: printImage.setWidth(getWidth());
562: printImage.setHeight(this .getStretchHeight());
563:
564: if (isEvaluateNow()) {
565: this .copy(printImage);
566: } else if (isEvaluateAuto()) {
567: initDelayedEvaluationPrint(recordedValuesImage);
568: } else {
569: filler.addBoundElement(this , printImage, evaluationType,
570: getEvaluationGroup(), band);
571: }
572:
573: return printImage;
574: }
575:
576: /**
577: *
578: */
579: protected void copy(JRPrintImage printImage) {
580: printImage.setRenderer(this .getRenderer());
581: printImage.setAnchorName(this .getAnchorName());
582: printImage.setHyperlinkReference(this .getHyperlinkReference());
583: printImage.setHyperlinkAnchor(this .getHyperlinkAnchor());
584: printImage.setHyperlinkPage(this .getHyperlinkPage());
585: printImage.setHyperlinkTooltip(getHyperlinkTooltip());
586: printImage.setBookmarkLevel(this .getBookmarkLevel());
587: printImage.setHyperlinkParameters(hyperlinkParameters);
588: }
589:
590: /**
591: *
592: */
593: public JRChild getCopy(JRAbstractObjectFactory factory) {
594: return factory.getImage(this );
595: }
596:
597: /**
598: *
599: */
600: public void collectExpressions(JRExpressionCollector collector) {
601: collector.collect(this );
602: }
603:
604: /**
605: *
606: */
607: public void writeXml(JRXmlWriter xmlWriter) throws IOException {
608: xmlWriter.writeImage(this );
609: }
610:
611: protected void resolveElement(JRPrintElement element,
612: byte evaluation) throws JRException {
613: evaluateImage(evaluation);
614:
615: copy((JRPrintImage) element);
616: }
617:
618: public int getBookmarkLevel() {
619: return ((JRImage) this .parent).getBookmarkLevel();
620: }
621:
622: /**
623: *
624: */
625: public byte getBorder() {
626: return JRStyleResolver.getBorder(this );
627: }
628:
629: public Byte getOwnBorder() {
630: return ((JRBox) parent).getOwnBorder();
631: }
632:
633: /**
634: *
635: */
636: public void setBorder(byte border) {
637: }
638:
639: /**
640: *
641: */
642: public Color getBorderColor() {
643: return JRStyleResolver.getBorderColor(this , getForecolor());
644: }
645:
646: public Color getOwnBorderColor() {
647: return ((JRBox) parent).getOwnBorderColor();
648: }
649:
650: /**
651: *
652: */
653: public void setBorderColor(Color borderColor) {
654: }
655:
656: /**
657: *
658: */
659: public int getPadding() {
660: return JRStyleResolver.getPadding(this );
661: }
662:
663: public Integer getOwnPadding() {
664: return ((JRBox) parent).getOwnPadding();
665: }
666:
667: /**
668: *
669: */
670: public void setPadding(int padding) {
671: }
672:
673: /**
674: *
675: */
676: public byte getTopBorder() {
677: return JRStyleResolver.getTopBorder(this );
678: }
679:
680: /**
681: *
682: */
683: public Byte getOwnTopBorder() {
684: return ((JRBox) parent).getOwnTopBorder();
685: }
686:
687: /**
688: *
689: */
690: public void setTopBorder(byte topBorder) {
691: }
692:
693: /**
694: *
695: */
696: public Color getTopBorderColor() {
697: return JRStyleResolver.getTopBorderColor(this , getForecolor());
698: }
699:
700: /**
701: *
702: */
703: public Color getOwnTopBorderColor() {
704: return ((JRBox) parent).getOwnTopBorderColor();
705: }
706:
707: /**
708: *
709: */
710: public void setTopBorderColor(Color topBorderColor) {
711: }
712:
713: /**
714: *
715: */
716: public int getTopPadding() {
717: return JRStyleResolver.getTopPadding(this );
718: }
719:
720: /**
721: *
722: */
723: public Integer getOwnTopPadding() {
724: return ((JRBox) parent).getOwnTopPadding();
725: }
726:
727: /**
728: *
729: */
730: public void setTopPadding(int topPadding) {
731: }
732:
733: /**
734: *
735: */
736: public byte getLeftBorder() {
737: return JRStyleResolver.getLeftBorder(this );
738: }
739:
740: /**
741: *
742: */
743: public Byte getOwnLeftBorder() {
744: return ((JRBox) parent).getOwnLeftBorder();
745: }
746:
747: /**
748: *
749: */
750: public void setLeftBorder(byte leftBorder) {
751: }
752:
753: /**
754: *
755: */
756: public Color getLeftBorderColor() {
757: return JRStyleResolver.getLeftBorderColor(this , getForecolor());
758: }
759:
760: /**
761: *
762: */
763: public Color getOwnLeftBorderColor() {
764: return ((JRBox) parent).getOwnLeftBorderColor();
765: }
766:
767: /**
768: *
769: */
770: public void setLeftBorderColor(Color leftBorderColor) {
771: }
772:
773: /**
774: *
775: */
776: public int getLeftPadding() {
777: return JRStyleResolver.getLeftPadding(this );
778: }
779:
780: /**
781: *
782: */
783: public Integer getOwnLeftPadding() {
784: return ((JRBox) parent).getOwnLeftPadding();
785: }
786:
787: /**
788: *
789: */
790: public void setLeftPadding(int leftPadding) {
791: }
792:
793: /**
794: *
795: */
796: public byte getBottomBorder() {
797: return JRStyleResolver.getBottomBorder(this );
798: }
799:
800: /**
801: *
802: */
803: public Byte getOwnBottomBorder() {
804: return ((JRBox) parent).getOwnBottomBorder();
805: }
806:
807: /**
808: *
809: */
810: public void setBottomBorder(byte bottomBorder) {
811: }
812:
813: /**
814: *
815: */
816: public Color getBottomBorderColor() {
817: return JRStyleResolver.getBottomBorderColor(this ,
818: getForecolor());
819: }
820:
821: /**
822: *
823: */
824: public Color getOwnBottomBorderColor() {
825: return ((JRBox) parent).getOwnBottomBorderColor();
826: }
827:
828: /**
829: *
830: */
831: public void setBottomBorderColor(Color bottomBorderColor) {
832: }
833:
834: /**
835: *
836: */
837: public int getBottomPadding() {
838: return JRStyleResolver.getBottomPadding(this );
839: }
840:
841: /**
842: *
843: */
844: public Integer getOwnBottomPadding() {
845: return ((JRBox) parent).getOwnBottomPadding();
846: }
847:
848: /**
849: *
850: */
851: public void setBottomPadding(int bottomPadding) {
852: }
853:
854: /**
855: *
856: */
857: public byte getRightBorder() {
858: return JRStyleResolver.getRightBorder(this );
859: }
860:
861: /**
862: *
863: */
864: public Byte getOwnRightBorder() {
865: return ((JRBox) parent).getOwnRightBorder();
866: }
867:
868: /**
869: *
870: */
871: public void setRightBorder(byte rightBorder) {
872: }
873:
874: /**
875: *
876: */
877: public Color getRightBorderColor() {
878: return JRStyleResolver
879: .getRightBorderColor(this , getForecolor());
880: }
881:
882: /**
883: *
884: */
885: public Color getOwnRightBorderColor() {
886: return ((JRBox) parent).getOwnRightBorderColor();
887: }
888:
889: /**
890: *
891: */
892: public void setRightBorderColor(Color rightBorderColor) {
893: }
894:
895: /**
896: *
897: */
898: public int getRightPadding() {
899: return JRStyleResolver.getRightPadding(this );
900: }
901:
902: /**
903: *
904: */
905: public Integer getOwnRightPadding() {
906: return ((JRBox) parent).getOwnRightPadding();
907: }
908:
909: /**
910: *
911: */
912: public void setRightPadding(int rightPadding) {
913: }
914:
915: /**
916: *
917: */
918: public void setBorder(Byte border) {
919: }
920:
921: /**
922: *
923: */
924: public void setPadding(Integer padding) {
925: }
926:
927: /**
928: *
929: */
930: public void setTopBorder(Byte topBorder) {
931: }
932:
933: /**
934: *
935: */
936: public void setTopPadding(Integer topPadding) {
937: }
938:
939: /**
940: *
941: */
942: public void setLeftBorder(Byte leftBorder) {
943: }
944:
945: /**
946: *
947: */
948: public void setLeftPadding(Integer leftPadding) {
949: }
950:
951: /**
952: *
953: */
954: public void setBottomBorder(Byte bottomBorder) {
955: }
956:
957: /**
958: *
959: */
960: public void setBottomPadding(Integer bottomPadding) {
961: }
962:
963: /**
964: *
965: */
966: public void setRightBorder(Byte rightBorder) {
967: }
968:
969: /**
970: *
971: */
972: public void setRightPadding(Integer rightPadding) {
973: }
974:
975: public JRCloneable createClone(JRFillCloneFactory factory) {
976: return new JRFillImage(this , factory);
977: }
978:
979: protected void collectDelayedEvaluations() {
980: collectDelayedEvaluations(getExpression());
981: collectDelayedEvaluations(getAnchorNameExpression());
982: collectDelayedEvaluations(getHyperlinkReferenceExpression());
983: collectDelayedEvaluations(getHyperlinkAnchorExpression());
984: collectDelayedEvaluations(getHyperlinkPageExpression());
985: }
986:
987: public JRHyperlinkParameter[] getHyperlinkParameters() {
988: return ((JRImage) parent).getHyperlinkParameters();
989: }
990:
991: public String getLinkType() {
992: return ((JRImage) parent).getLinkType();
993: }
994:
995: public JRExpression getHyperlinkTooltipExpression() {
996: return ((JRImage) parent).getHyperlinkTooltipExpression();
997: }
998:
999: }
|