1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRAreaPlot; 33 import net.sf.jasperreports.engine.JRChartPlot; 34 import net.sf.jasperreports.engine.JRConstants; 35 import net.sf.jasperreports.engine.JRExpression; 36 import net.sf.jasperreports.engine.JRExpressionCollector; 37 import net.sf.jasperreports.engine.JRFont; 38 import net.sf.jasperreports.engine.base.JRBaseChartPlot; 39 import net.sf.jasperreports.engine.base.JRBaseObjectFactory; 40 41 45 public class JRBaseAreaPlot extends JRBaseChartPlot implements JRAreaPlot { 46 47 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 48 49 protected JRExpression categoryAxisLabelExpression = null; 50 protected JRFont categoryAxisLabelFont = null; 51 protected Color categoryAxisLabelColor = null; 52 protected JRFont categoryAxisTickLabelFont = null; 53 protected Color categoryAxisTickLabelColor = null; 54 protected String categoryAxisTickLabelMask = null; 55 protected Color categoryAxisLineColor = null; 56 57 protected JRExpression valueAxisLabelExpression = null; 58 protected JRFont valueAxisLabelFont = null; 59 protected Color valueAxisLabelColor = null; 60 protected JRFont valueAxisTickLabelFont = null; 61 protected Color valueAxisTickLabelColor = null; 62 protected String valueAxisTickLabelMask = null; 63 protected Color valueAxisLineColor = null; 64 65 66 69 public JRBaseAreaPlot( JRChartPlot areaPlot){ 70 super( areaPlot); 71 } 72 73 74 77 public JRBaseAreaPlot( JRAreaPlot areaPlot, JRBaseObjectFactory factory ){ 78 super( areaPlot, factory ); 79 80 categoryAxisLabelExpression = factory.getExpression( areaPlot.getCategoryAxisLabelExpression() ); 81 categoryAxisLabelFont = factory.getFont(areaPlot.getCategoryAxisLabelFont()); 82 categoryAxisLabelColor = areaPlot.getCategoryAxisLabelColor(); 83 categoryAxisTickLabelFont = factory.getFont(areaPlot.getCategoryAxisTickLabelFont()); 84 categoryAxisTickLabelColor = areaPlot.getCategoryAxisTickLabelColor(); 85 categoryAxisTickLabelMask = areaPlot.getCategoryAxisTickLabelMask(); 86 categoryAxisLineColor = areaPlot.getCategoryAxisLineColor(); 87 88 valueAxisLabelExpression = factory.getExpression( areaPlot.getValueAxisLabelExpression() ); 89 valueAxisLabelFont = factory.getFont(areaPlot.getValueAxisLabelFont()); 90 valueAxisLabelColor = areaPlot.getValueAxisLabelColor(); 91 valueAxisTickLabelFont = factory.getFont(areaPlot.getValueAxisTickLabelFont()); 92 valueAxisTickLabelColor = areaPlot.getValueAxisTickLabelColor(); 93 valueAxisTickLabelMask = areaPlot.getValueAxisTickLabelMask(); 94 valueAxisLineColor = areaPlot.getValueAxisLineColor(); 95 } 96 97 100 public JRExpression getCategoryAxisLabelExpression(){ 101 return categoryAxisLabelExpression; 102 } 103 104 107 public JRFont getCategoryAxisLabelFont() 108 { 109 return categoryAxisLabelFont; 110 } 111 112 115 public Color getCategoryAxisLabelColor() 116 { 117 return categoryAxisLabelColor; 118 } 119 120 123 public JRFont getCategoryAxisTickLabelFont() 124 { 125 return categoryAxisTickLabelFont; 126 } 127 128 131 public Color getCategoryAxisTickLabelColor() 132 { 133 return categoryAxisTickLabelColor; 134 } 135 136 139 public String getCategoryAxisTickLabelMask() 140 { 141 return categoryAxisTickLabelMask; 142 } 143 144 147 public Color getCategoryAxisLineColor() 148 { 149 return categoryAxisLineColor; 150 } 151 152 155 public JRExpression getValueAxisLabelExpression(){ 156 return valueAxisLabelExpression; 157 } 158 159 162 public JRFont getValueAxisLabelFont() 163 { 164 return valueAxisLabelFont; 165 } 166 167 170 public Color getValueAxisLabelColor() 171 { 172 return valueAxisLabelColor; 173 } 174 175 178 public JRFont getValueAxisTickLabelFont() 179 { 180 return valueAxisTickLabelFont; 181 } 182 183 186 public Color getValueAxisTickLabelColor() 187 { 188 return valueAxisTickLabelColor; 189 } 190 191 194 public String getValueAxisTickLabelMask() 195 { 196 return valueAxisTickLabelMask; 197 } 198 199 202 public Color getValueAxisLineColor() 203 { 204 return valueAxisLineColor; 205 } 206 207 210 public void collectExpressions(JRExpressionCollector collector) 211 { 212 collector.collect(this); 213 } 214 215 } 216 | Popular Tags |