1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRHighLowPlot; 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 42 46 public class JRBaseHighLowPlot extends JRBaseChartPlot implements JRHighLowPlot 47 { 48 49 52 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 53 54 protected JRExpression timeAxisLabelExpression = null; 55 protected JRFont timeAxisLabelFont = null; 56 protected Color timeAxisLabelColor = null; 57 protected JRFont timeAxisTickLabelFont = null; 58 protected Color timeAxisTickLabelColor = null; 59 protected String timeAxisTickLabelMask = null; 60 protected Color timeAxisLineColor = null; 61 62 protected JRExpression valueAxisLabelExpression = null; 63 protected JRFont valueAxisLabelFont = null; 64 protected Color valueAxisLabelColor = null; 65 protected JRFont valueAxisTickLabelFont = null; 66 protected Color valueAxisTickLabelColor = null; 67 protected String valueAxisTickLabelMask = null; 68 protected Color valueAxisLineColor = null; 69 70 protected boolean isShowOpenTicks = false; 71 protected boolean isShowCloseTicks = false; 72 73 74 77 public JRBaseHighLowPlot(JRChartPlot highLowPlot) 78 { 79 super(highLowPlot); 80 } 81 82 83 86 public JRBaseHighLowPlot(JRHighLowPlot highLowPlot, JRBaseObjectFactory factory) 87 { 88 super(highLowPlot, factory); 89 90 isShowOpenTicks = highLowPlot.isShowOpenTicks(); 91 isShowCloseTicks = highLowPlot.isShowCloseTicks(); 92 93 timeAxisLabelExpression = factory.getExpression( highLowPlot.getTimeAxisLabelExpression() ); 94 timeAxisLabelFont = factory.getFont(highLowPlot.getTimeAxisLabelFont()); 95 timeAxisLabelColor = highLowPlot.getTimeAxisLabelColor(); 96 timeAxisTickLabelFont = factory.getFont(highLowPlot.getTimeAxisTickLabelFont()); 97 timeAxisTickLabelColor = highLowPlot.getTimeAxisTickLabelColor(); 98 timeAxisTickLabelMask = highLowPlot.getTimeAxisTickLabelMask(); 99 timeAxisLineColor = highLowPlot.getTimeAxisLineColor(); 100 101 valueAxisLabelExpression = factory.getExpression( highLowPlot.getValueAxisLabelExpression() ); 102 valueAxisLabelFont = factory.getFont(highLowPlot.getValueAxisLabelFont()); 103 valueAxisLabelColor = highLowPlot.getValueAxisLabelColor(); 104 valueAxisTickLabelFont = factory.getFont(highLowPlot.getValueAxisTickLabelFont()); 105 valueAxisTickLabelColor = highLowPlot.getValueAxisTickLabelColor(); 106 valueAxisTickLabelMask = highLowPlot.getValueAxisTickLabelMask(); 107 valueAxisLineColor = highLowPlot.getValueAxisTickLabelColor(); 108 } 109 110 111 114 public JRExpression getTimeAxisLabelExpression(){ 115 return timeAxisLabelExpression; 116 } 117 118 121 public JRFont getTimeAxisLabelFont() 122 { 123 return timeAxisLabelFont; 124 } 125 126 129 public Color getTimeAxisLabelColor() 130 { 131 return timeAxisLabelColor; 132 } 133 134 135 138 public JRFont getTimeAxisTickLabelFont() 139 { 140 return timeAxisTickLabelFont; 141 } 142 143 146 public Color getTimeAxisTickLabelColor() 147 { 148 return timeAxisTickLabelColor; 149 } 150 151 154 public String getTimeAxisTickLabelMask() 155 { 156 return timeAxisTickLabelMask; 157 } 158 159 162 public Color getTimeAxisLineColor() 163 { 164 return timeAxisLineColor; 165 } 166 169 public JRExpression getValueAxisLabelExpression(){ 170 return valueAxisLabelExpression; 171 } 172 173 176 public JRFont getValueAxisLabelFont() 177 { 178 return valueAxisLabelFont; 179 } 180 181 184 public Color getValueAxisLabelColor() 185 { 186 return valueAxisLabelColor; 187 } 188 189 192 public JRFont getValueAxisTickLabelFont() 193 { 194 return valueAxisTickLabelFont; 195 } 196 197 200 public Color getValueAxisTickLabelColor() 201 { 202 return valueAxisTickLabelColor; 203 } 204 205 208 public String getValueAxisTickLabelMask() 209 { 210 return valueAxisTickLabelMask; 211 } 212 213 216 public Color getValueAxisLineColor() 217 { 218 return valueAxisLineColor; 219 } 220 221 224 public boolean isShowOpenTicks() 225 { 226 return isShowOpenTicks; 227 } 228 229 230 233 public void setShowOpenTicks(boolean showOpenTicks) 234 { 235 isShowOpenTicks = showOpenTicks; 236 } 237 238 239 242 public boolean isShowCloseTicks() 243 { 244 return isShowCloseTicks; 245 } 246 247 248 251 public void setShowCloseTicks(boolean showCloseTicks) 252 { 253 isShowCloseTicks = showCloseTicks; 254 } 255 256 259 public void collectExpressions(JRExpressionCollector collector) 260 { 261 collector.collect(this); 262 } 263 264 } 265 | Popular Tags |