1 28 package net.sf.jasperreports.charts.xml; 29 30 import net.sf.jasperreports.charts.design.JRDesignCandlestickPlot; 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 JRCandlestickPlotFactory extends JRBaseFactory 42 { 43 44 private static final String ATTRIBUTE_isShowVolume = "isShowVolume"; 45 46 47 50 public Object createObject(Attributes atts) 51 { 52 JRChart chart = (JRChart) digester.peek(); 53 JRDesignCandlestickPlot plot = (JRDesignCandlestickPlot)chart.getPlot(); 54 55 String isShowVolume = atts.getValue(ATTRIBUTE_isShowVolume); 56 if (isShowVolume != null && isShowVolume.length() > 0) { 57 plot.setShowVolume(Boolean.valueOf(isShowVolume).booleanValue()); 58 } 59 60 return plot; 61 } 62 } 63 | Popular Tags |