1 28 package net.sf.jasperreports.charts.xml; 29 30 import net.sf.jasperreports.charts.design.JRDesignTimeSeriesPlot; 31 import net.sf.jasperreports.engine.JRChart; 32 import net.sf.jasperreports.engine.xml.JRBaseFactory; 33 34 import org.xml.sax.Attributes ; 35 36 40 public class JRTimeSeriesPlotFactory extends JRBaseFactory { 41 42 private static final String ATTRIBUTE_isShowShapes = "isShowShapes"; 43 private static final String ATTRIBUTE_isShowLines = "isShowLines"; 44 45 public Object createObject( Attributes attrs ){ 46 JRChart chart = (JRChart)digester.peek(); 47 JRDesignTimeSeriesPlot plot = (JRDesignTimeSeriesPlot)chart.getPlot(); 48 49 String isShowShapes = attrs.getValue( ATTRIBUTE_isShowShapes ); 50 if( isShowShapes != null && isShowShapes.length() > 0 ){ 51 plot.setShowShapes(Boolean.valueOf(isShowShapes).booleanValue()); 52 } 53 54 String isShowLines = attrs.getValue( ATTRIBUTE_isShowLines ); 55 if( isShowLines != null && isShowLines.length() > 0 ){ 56 plot.setShowLines(Boolean.valueOf(isShowLines).booleanValue() ); 57 } 58 59 return plot; 60 } 61 } 62 | Popular Tags |