1 28 package net.sf.jasperreports.charts.design; 29 30 import net.sf.jasperreports.charts.JRChartAxis; 31 import net.sf.jasperreports.charts.base.JRBaseChartAxis; 32 import net.sf.jasperreports.engine.JRConstants; 33 import net.sf.jasperreports.engine.JRElement; 34 import net.sf.jasperreports.engine.design.JRDesignChart; 35 36 42 public class JRDesignChartAxis extends JRBaseChartAxis 43 { 44 45 48 protected JRDesignChart parentChart = null; 49 50 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 51 52 57 public JRDesignChartAxis(JRDesignChart parentChart) 58 { 59 this.parentChart = parentChart; 60 } 61 62 68 public void setPosition(byte position) 69 { 70 this.position = position; 71 } 72 73 80 public void setChart(JRDesignChart chart) 81 { 82 chart.setBackcolor(parentChart.getBackcolor()); 85 chart.setShowLegend(parentChart.isShowLegend()); 86 chart.setTitleExpression(parentChart.getTitleExpression()); 87 chart.setTitleFont(parentChart.getTitleFont()); 88 chart.setTitlePosition(parentChart.getTitlePosition()); 89 chart.setTitleColor(parentChart.getTitleColor()); 90 chart.setSubtitleExpression(parentChart.getSubtitleExpression()); 91 chart.setSubtitleFont(parentChart.getSubtitleFont()); 92 chart.setSubtitleColor(parentChart.getSubtitleColor()); 93 chart.setLegendColor(parentChart.getLegendColor()); 94 chart.setLegendBackgroundColor(parentChart.getLegendBackgroundColor()); 95 chart.setLegendFont(parentChart.getLegendFont()); 96 this.chart = chart; 97 } 98 99 106 public void addElement(JRElement element) 107 { 108 setChart((JRDesignChart)element); 109 } 110 } 111 | Popular Tags |