1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRTimeSeriesPlot; 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 JRBaseTimeSeriesPlot extends JRBaseChartPlot implements JRTimeSeriesPlot { 46 47 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 48 49 protected JRExpression timeAxisLabelExpression = null; 50 protected JRFont timeAxisLabelFont = null; 51 protected Color timeAxisLabelColor = null; 52 protected JRFont timeAxisTickLabelFont = null; 53 protected Color timeAxisTickLabelColor = null; 54 protected String timeAxisTickLabelMask = null; 55 protected Color timeAxisLineColor = 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 boolean isShowShapes = true; 66 boolean isShowLines = true; 67 68 71 protected JRBaseTimeSeriesPlot( JRChartPlot plot ){ 72 super( plot ); 73 } 74 75 78 public JRBaseTimeSeriesPlot( JRTimeSeriesPlot plot, JRBaseObjectFactory factory ){ 79 super( plot, factory ); 80 81 isShowLines = plot.isShowLines(); 82 isShowShapes = plot.isShowShapes(); 83 84 timeAxisLabelExpression = factory.getExpression( plot.getTimeAxisLabelExpression() ); 85 timeAxisLabelFont = factory.getFont(plot.getTimeAxisLabelFont()); 86 timeAxisLabelColor = plot.getTimeAxisLabelColor(); 87 timeAxisTickLabelFont = factory.getFont(plot.getTimeAxisTickLabelFont()); 88 timeAxisTickLabelColor = plot.getTimeAxisTickLabelColor(); 89 timeAxisTickLabelMask = plot.getTimeAxisTickLabelMask(); 90 timeAxisLineColor = plot.getTimeAxisLineColor(); 91 92 valueAxisLabelExpression = factory.getExpression( plot.getValueAxisLabelExpression() ); 93 valueAxisLabelFont = factory.getFont(plot.getValueAxisLabelFont()); 94 valueAxisLabelColor = plot.getValueAxisLabelColor(); 95 valueAxisTickLabelFont = factory.getFont(plot.getValueAxisTickLabelFont()); 96 valueAxisTickLabelColor = plot.getValueAxisTickLabelColor(); 97 valueAxisTickLabelMask = plot.getValueAxisTickLabelMask(); 98 valueAxisLineColor = plot.getValueAxisTickLabelColor(); 99 } 100 101 104 public JRExpression getTimeAxisLabelExpression(){ 105 return timeAxisLabelExpression; 106 } 107 108 111 public JRFont getTimeAxisLabelFont() 112 { 113 return timeAxisLabelFont; 114 } 115 116 119 public Color getTimeAxisLabelColor() 120 { 121 return timeAxisLabelColor; 122 } 123 124 127 public JRFont getTimeAxisTickLabelFont() 128 { 129 return timeAxisTickLabelFont; 130 } 131 132 135 public Color getTimeAxisTickLabelColor() 136 { 137 return timeAxisTickLabelColor; 138 } 139 140 143 public String getTimeAxisTickLabelMask() 144 { 145 return timeAxisTickLabelMask; 146 } 147 148 151 public Color getTimeAxisLineColor() 152 { 153 return timeAxisLineColor; 154 } 155 156 159 public JRExpression getValueAxisLabelExpression(){ 160 return valueAxisLabelExpression; 161 } 162 163 166 public JRFont getValueAxisLabelFont() 167 { 168 return valueAxisLabelFont; 169 } 170 171 174 public Color getValueAxisLabelColor() 175 { 176 return valueAxisLabelColor; 177 } 178 179 182 public JRFont getValueAxisTickLabelFont() 183 { 184 return valueAxisTickLabelFont; 185 } 186 187 190 public Color getValueAxisTickLabelColor() 191 { 192 return valueAxisTickLabelColor; 193 } 194 195 198 public String getValueAxisTickLabelMask() 199 { 200 return valueAxisTickLabelMask; 201 } 202 203 206 public Color getValueAxisLineColor() 207 { 208 return valueAxisLineColor; 209 } 210 211 214 public boolean isShowLines(){ 215 return isShowLines; 216 } 217 218 221 public boolean isShowShapes(){ 222 return isShowShapes; 223 } 224 225 228 public void setShowLines( boolean val ){ 229 this.isShowLines = val; 230 } 231 232 235 public void setShowShapes( boolean val ){ 236 this.isShowShapes = val; 237 } 238 239 242 public void collectExpressions(JRExpressionCollector collector) 243 { 244 collector.collect(this); 245 } 246 247 } 248 | Popular Tags |