1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRCandlestickPlot; 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 JRBaseCandlestickPlot extends JRBaseChartPlot implements JRCandlestickPlot 47 { 48 51 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 52 53 protected JRExpression timeAxisLabelExpression = null; 54 protected JRFont timeAxisLabelFont = null; 55 protected Color timeAxisLabelColor = null; 56 protected JRFont timeAxisTickLabelFont = null; 57 protected Color timeAxisTickLabelColor = null; 58 protected String timeAxisTickLabelMask = null; 59 protected Color timeAxisLineColor = null; 60 61 protected JRExpression valueAxisLabelExpression = null; 62 protected JRFont valueAxisLabelFont = null; 63 protected Color valueAxisLabelColor = null; 64 protected JRFont valueAxisTickLabelFont = null; 65 protected Color valueAxisTickLabelColor = null; 66 protected String valueAxisTickLabelMask = null; 67 protected Color valueAxisLineColor = null; 68 69 protected boolean isShowVolume = true; 70 71 72 75 protected JRBaseCandlestickPlot(JRChartPlot candlestickPlot) 76 { 77 super(candlestickPlot); 78 } 79 80 81 84 public JRBaseCandlestickPlot(JRCandlestickPlot candlestickPlot, JRBaseObjectFactory factory) 85 { 86 super(candlestickPlot, factory); 87 88 isShowVolume = candlestickPlot.isShowVolume(); 89 90 timeAxisLabelExpression = factory.getExpression( candlestickPlot.getTimeAxisLabelExpression() ); 91 timeAxisLabelFont = factory.getFont(candlestickPlot.getTimeAxisLabelFont()); 92 timeAxisLabelColor = candlestickPlot.getTimeAxisLabelColor(); 93 timeAxisTickLabelFont = factory.getFont(candlestickPlot.getTimeAxisTickLabelFont()); 94 timeAxisTickLabelColor = candlestickPlot.getTimeAxisTickLabelColor(); 95 timeAxisTickLabelMask = candlestickPlot.getTimeAxisTickLabelMask(); 96 timeAxisLineColor = candlestickPlot.getTimeAxisLineColor(); 97 98 valueAxisLabelExpression = factory.getExpression( candlestickPlot.getValueAxisLabelExpression() ); 99 valueAxisLabelFont = factory.getFont(candlestickPlot.getValueAxisLabelFont()); 100 valueAxisLabelColor = candlestickPlot.getValueAxisLabelColor(); 101 valueAxisTickLabelFont = factory.getFont(candlestickPlot.getValueAxisTickLabelFont()); 102 valueAxisTickLabelColor = candlestickPlot.getValueAxisTickLabelColor(); 103 valueAxisTickLabelMask = candlestickPlot.getValueAxisTickLabelMask(); 104 valueAxisLineColor = candlestickPlot.getValueAxisTickLabelColor(); 105 } 106 107 108 111 public JRExpression getTimeAxisLabelExpression(){ 112 return timeAxisLabelExpression; 113 } 114 115 118 public JRFont getTimeAxisLabelFont() 119 { 120 return timeAxisLabelFont; 121 } 122 123 126 public Color getTimeAxisLabelColor() 127 { 128 return timeAxisLabelColor; 129 } 130 131 134 public JRFont getTimeAxisTickLabelFont() 135 { 136 return timeAxisTickLabelFont; 137 } 138 139 142 public Color getTimeAxisTickLabelColor() 143 { 144 return timeAxisTickLabelColor; 145 } 146 147 150 public String getTimeAxisTickLabelMask() 151 { 152 return timeAxisTickLabelMask; 153 } 154 155 158 public Color getTimeAxisLineColor() 159 { 160 return timeAxisLineColor; 161 } 162 163 166 public JRExpression getValueAxisLabelExpression(){ 167 return valueAxisLabelExpression; 168 } 169 170 173 public JRFont getValueAxisLabelFont() 174 { 175 return valueAxisLabelFont; 176 } 177 178 181 public Color getValueAxisLabelColor() 182 { 183 return valueAxisLabelColor; 184 } 185 186 189 public JRFont getValueAxisTickLabelFont() 190 { 191 return valueAxisTickLabelFont; 192 } 193 194 197 public Color getValueAxisTickLabelColor() 198 { 199 return valueAxisTickLabelColor; 200 } 201 202 205 public String getValueAxisTickLabelMask() 206 { 207 return valueAxisTickLabelMask; 208 } 209 210 213 public Color getValueAxisLineColor() 214 { 215 return valueAxisLineColor; 216 } 217 218 221 public boolean isShowVolume() 222 { 223 return isShowVolume; 224 } 225 226 227 230 public void setShowVolume(boolean ShowVolume) 231 { 232 isShowVolume = ShowVolume; 233 } 234 235 238 public void collectExpressions(JRExpressionCollector collector) 239 { 240 collector.collect(this); 241 } 242 243 } 244 | Popular Tags |