1 28 package net.sf.jasperreports.charts.xml; 29 30 import net.sf.jasperreports.charts.design.JRDesignPie3DPlot; 31 import net.sf.jasperreports.engine.JRChart; 32 import net.sf.jasperreports.engine.xml.JRBaseFactory; 33 34 import org.xml.sax.Attributes ; 35 36 37 41 public class JRPie3DPlotFactory extends JRBaseFactory 42 { 43 46 private static final String ATTRIBUTE_depthFactor = "depthFactor"; 47 48 51 public Object createObject(Attributes atts) 52 { 53 JRChart chart = (JRChart) digester.peek(); 54 JRDesignPie3DPlot pie3DPlot = (JRDesignPie3DPlot)chart.getPlot(); 55 56 String depthFactor = atts.getValue(ATTRIBUTE_depthFactor); 57 if (depthFactor != null && depthFactor.length() > 0) 58 { 59 pie3DPlot.setDepthFactor(Double.parseDouble(depthFactor)); 60 } 61 62 63 return pie3DPlot; 64 } 65 } 66 | Popular Tags |