1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRScatterPlot; 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 JRBaseScatterPlot extends JRBaseChartPlot implements JRScatterPlot { 46 47 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 48 49 protected JRExpression xAxisLabelExpression = null; 50 protected JRFont xAxisLabelFont = null; 51 protected Color xAxisLabelColor = null; 52 protected JRFont xAxisTickLabelFont = null; 53 protected Color xAxisTickLabelColor = null; 54 protected String xAxisTickLabelMask = null; 55 protected Color xAxisLineColor = null; 56 57 protected JRExpression yAxisLabelExpression = null; 58 protected JRFont yAxisLabelFont = null; 59 protected Color yAxisLabelColor = null; 60 protected JRFont yAxisTickLabelFont = null; 61 protected Color yAxisTickLabelColor = null; 62 protected String yAxisTickLabelMask = null; 63 protected Color yAxisLineColor = null; 64 65 boolean isShowShapes = true; 66 boolean isShowLines = true; 67 68 69 72 public JRBaseScatterPlot( JRChartPlot scattedPlot){ 73 super( scattedPlot); 74 } 75 76 79 public JRBaseScatterPlot( JRScatterPlot scattedPlot, JRBaseObjectFactory factory ){ 80 super( scattedPlot, factory ); 81 82 isShowShapes = scattedPlot.isShowShapes(); 83 isShowLines = scattedPlot.isShowLines(); 84 85 xAxisLabelExpression = factory.getExpression( scattedPlot.getXAxisLabelExpression() ); 86 xAxisLabelFont = factory.getFont(scattedPlot.getXAxisLabelFont()); 87 xAxisLabelColor = scattedPlot.getXAxisLabelColor(); 88 xAxisTickLabelFont = factory.getFont(scattedPlot.getXAxisTickLabelFont()); 89 xAxisTickLabelColor = scattedPlot.getXAxisTickLabelColor(); 90 xAxisTickLabelMask = scattedPlot.getXAxisTickLabelMask(); 91 xAxisLineColor = scattedPlot.getXAxisLineColor(); 92 93 yAxisLabelExpression = factory.getExpression( scattedPlot.getYAxisLabelExpression() ); 94 yAxisLabelFont = factory.getFont(scattedPlot.getYAxisLabelFont()); 95 yAxisLabelColor = scattedPlot.getYAxisLabelColor(); 96 yAxisTickLabelFont = factory.getFont(scattedPlot.getYAxisTickLabelFont()); 97 yAxisTickLabelColor = scattedPlot.getYAxisTickLabelColor(); 98 yAxisTickLabelMask = scattedPlot.getYAxisTickLabelMask(); 99 yAxisLineColor = scattedPlot.getYAxisLineColor(); 100 } 101 102 105 public JRExpression getXAxisLabelExpression(){ 106 return xAxisLabelExpression; 107 } 108 109 112 public JRFont getXAxisLabelFont() 113 { 114 return xAxisLabelFont; 115 } 116 117 120 public Color getXAxisLabelColor() 121 { 122 return xAxisLabelColor; 123 } 124 125 128 public JRFont getXAxisTickLabelFont() 129 { 130 return xAxisTickLabelFont; 131 } 132 133 136 public Color getXAxisTickLabelColor() 137 { 138 return xAxisTickLabelColor; 139 } 140 141 144 public String getXAxisTickLabelMask() 145 { 146 return xAxisTickLabelMask; 147 } 148 149 152 public Color getXAxisLineColor() 153 { 154 return xAxisLineColor; 155 } 156 157 160 public JRExpression getYAxisLabelExpression() { 161 return yAxisLabelExpression; 162 } 163 164 167 public JRFont getYAxisLabelFont() 168 { 169 return yAxisLabelFont; 170 } 171 172 175 public Color getYAxisLabelColor() 176 { 177 return yAxisLabelColor; 178 } 179 180 183 public JRFont getYAxisTickLabelFont() 184 { 185 return yAxisTickLabelFont; 186 } 187 188 191 public Color getYAxisTickLabelColor() 192 { 193 return yAxisTickLabelColor; 194 } 195 196 199 public String getYAxisTickLabelMask() 200 { 201 return yAxisTickLabelMask; 202 } 203 204 207 public Color getYAxisLineColor() 208 { 209 return yAxisLineColor; 210 } 211 212 215 public boolean isShowShapes(){ 216 return isShowShapes; 217 } 218 219 222 public boolean isShowLines(){ 223 return isShowLines; 224 } 225 226 229 public void setShowShapes( boolean value ){ 230 this.isShowShapes = value; 231 } 232 233 236 public void setShowLines( boolean value ){ 237 this.isShowLines = value; 238 } 239 240 243 public void collectExpressions(JRExpressionCollector collector) 244 { 245 collector.collect(this); 246 } 247 248 } 249 | Popular Tags |