1 28 package net.sf.jasperreports.engine.base; 29 30 import java.io.IOException ; 31 32 import net.sf.jasperreports.engine.JRAbstractObjectFactory; 33 import net.sf.jasperreports.engine.JRChild; 34 import net.sf.jasperreports.engine.JRConstants; 35 import net.sf.jasperreports.engine.JRExpressionCollector; 36 import net.sf.jasperreports.engine.JRRectangle; 37 import net.sf.jasperreports.engine.util.JRStyleResolver; 38 import net.sf.jasperreports.engine.xml.JRXmlWriter; 39 40 41 47 public class JRBaseRectangle extends JRBaseGraphicElement implements JRRectangle 48 { 49 50 51 54 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 55 56 59 protected Integer radius; 60 61 62 70 protected JRBaseRectangle(JRRectangle rectangle, JRBaseObjectFactory factory) 71 { 72 super(rectangle, factory); 73 74 radius = rectangle.getOwnRadius(); 75 } 76 77 78 81 public int getRadius() 82 { 83 return JRStyleResolver.getRadius(this); 84 } 85 86 public Integer getOwnRadius() 87 { 88 return this.radius; 89 } 90 91 94 public void setRadius(int radius) 95 { 96 this.radius = new Integer (radius); 97 } 98 99 102 public void setRadius(Integer radius) 103 { 104 this.radius = radius; 105 } 106 107 110 public JRChild getCopy(JRAbstractObjectFactory factory) 111 { 112 return factory.getRectangle(this); 113 } 114 115 118 public void collectExpressions(JRExpressionCollector collector) 119 { 120 collector.collect(this); 121 } 122 123 126 public void writeXml(JRXmlWriter xmlWriter) throws IOException 127 { 128 xmlWriter.writeRectangle(this); 129 } 130 131 132 } 133 | Popular Tags |