1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.JRPrintImage; 31 32 import org.xml.sax.Attributes ; 33 34 35 39 public class JRPrintImageSourceFactory extends JRBaseFactory 40 { 41 42 43 46 private static final String ATTRIBUTE_isEmbedded = "isEmbedded"; 47 48 49 52 public Object createObject(Attributes atts) 53 { 54 JRPrintImage printImage = (JRPrintImage)digester.peek(); 55 56 JRPrintImageSourceObject imageSource = new JRPrintImageSourceObject(); 57 58 imageSource.setPrintImage(printImage); 59 60 String isEmbedded = atts.getValue(ATTRIBUTE_isEmbedded); 61 if (isEmbedded != null && isEmbedded.length() > 0) 62 { 63 imageSource.setEmbedded(Boolean.valueOf(isEmbedded).booleanValue()); 64 } 65 66 return imageSource; 67 } 68 69 70 } 71 | Popular Tags |