1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.design.JRDesignRectangle; 31 import net.sf.jasperreports.engine.design.JasperDesign; 32 33 import org.xml.sax.Attributes ; 34 35 36 40 public class JRRectangleFactory extends JRBaseFactory 41 { 42 43 44 47 private static final String ATTRIBUTE_radius = "radius"; 48 49 50 53 public Object createObject(Attributes atts) 54 { 55 JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); 56 57 JRDesignRectangle rectangle = new JRDesignRectangle(jasperDesign); 58 59 String radius = atts.getValue(ATTRIBUTE_radius); 60 if (radius != null && radius.length() > 0) 61 { 62 rectangle.setRadius(Integer.parseInt(radius)); 63 } 64 65 return rectangle; 66 } 67 68 69 } 70 | Popular Tags |