1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRBar3DPlot; 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 import org.jfree.chart.renderer.category.BarRenderer3D; 42 43 47 public class JRBaseBar3DPlot extends JRBaseChartPlot implements JRBar3DPlot { 48 49 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 50 51 protected JRExpression categoryAxisLabelExpression = null; 52 protected JRFont categoryAxisLabelFont = null; 53 protected Color categoryAxisLabelColor = null; 54 protected JRFont categoryAxisTickLabelFont = null; 55 protected Color categoryAxisTickLabelColor = null; 56 protected String categoryAxisTickLabelMask = null; 57 protected Color categoryAxisLineColor = null; 58 59 protected JRExpression valueAxisLabelExpression = null; 60 protected JRFont valueAxisLabelFont = null; 61 protected Color valueAxisLabelColor = null; 62 protected JRFont valueAxisTickLabelFont = null; 63 protected Color valueAxisTickLabelColor = null; 64 protected String valueAxisTickLabelMask = null; 65 protected Color valueAxisLineColor = null; 66 67 protected double xOffset = BarRenderer3D.DEFAULT_X_OFFSET; 68 protected double yOffset = BarRenderer3D.DEFAULT_Y_OFFSET; 69 protected boolean isShowLabels = false; 70 71 72 75 public JRBaseBar3DPlot( JRChartPlot barPlot){ 76 super( barPlot); 77 } 78 79 80 83 public JRBaseBar3DPlot( JRBar3DPlot barPlot, JRBaseObjectFactory factory ){ 84 super( barPlot, factory ); 85 86 xOffset = barPlot.getXOffset(); 87 yOffset = barPlot.getYOffset(); 88 isShowLabels = barPlot.isShowLabels(); 89 90 categoryAxisLabelExpression = factory.getExpression( barPlot.getCategoryAxisLabelExpression() ); 91 categoryAxisLabelFont = factory.getFont(barPlot.getCategoryAxisLabelFont()); 92 categoryAxisLabelColor = barPlot.getCategoryAxisLabelColor(); 93 categoryAxisTickLabelFont = factory.getFont(barPlot.getCategoryAxisTickLabelFont()); 94 categoryAxisTickLabelColor = barPlot.getCategoryAxisTickLabelColor(); 95 categoryAxisTickLabelMask = barPlot.getCategoryAxisTickLabelMask(); 96 categoryAxisLineColor = barPlot.getCategoryAxisLineColor(); 97 98 valueAxisLabelExpression = factory.getExpression( barPlot.getValueAxisLabelExpression() ); 99 valueAxisLabelFont = factory.getFont(barPlot.getValueAxisLabelFont()); 100 valueAxisLabelColor = barPlot.getValueAxisLabelColor(); 101 valueAxisTickLabelFont = factory.getFont(barPlot.getValueAxisTickLabelFont()); 102 valueAxisTickLabelColor = barPlot.getValueAxisTickLabelColor(); 103 valueAxisTickLabelMask = barPlot.getValueAxisTickLabelMask(); 104 valueAxisLineColor = barPlot.getValueAxisLineColor(); 105 } 106 107 110 public JRExpression getCategoryAxisLabelExpression(){ 111 return categoryAxisLabelExpression; 112 } 113 114 117 public JRFont getCategoryAxisLabelFont() 118 { 119 return categoryAxisLabelFont; 120 } 121 122 125 public Color getCategoryAxisLabelColor() 126 { 127 return categoryAxisLabelColor; 128 } 129 130 133 public JRFont getCategoryAxisTickLabelFont() 134 { 135 return categoryAxisTickLabelFont; 136 } 137 138 141 public Color getCategoryAxisTickLabelColor() 142 { 143 return categoryAxisTickLabelColor; 144 } 145 146 149 public String getCategoryAxisTickLabelMask() 150 { 151 return categoryAxisTickLabelMask; 152 } 153 154 157 public Color getCategoryAxisLineColor() 158 { 159 return categoryAxisLineColor; 160 } 161 162 165 public JRExpression getValueAxisLabelExpression(){ 166 return valueAxisLabelExpression; 167 } 168 169 172 public JRFont getValueAxisLabelFont() 173 { 174 return valueAxisLabelFont; 175 } 176 177 180 public Color getValueAxisLabelColor() 181 { 182 return valueAxisLabelColor; 183 } 184 185 188 public JRFont getValueAxisTickLabelFont() 189 { 190 return valueAxisTickLabelFont; 191 } 192 193 196 public Color getValueAxisTickLabelColor() 197 { 198 return valueAxisTickLabelColor; 199 } 200 201 204 public String getValueAxisTickLabelMask() 205 { 206 return valueAxisTickLabelMask; 207 } 208 209 212 public Color getValueAxisLineColor() 213 { 214 return valueAxisLineColor; 215 } 216 217 220 public double getXOffset(){ 221 return xOffset; 222 } 223 224 227 public void setXOffset( double xOffset ){ 228 this.xOffset = xOffset; 229 } 230 231 234 public double getYOffset(){ 235 return yOffset; 236 } 237 238 241 public void setYOffset( double yOffset ){ 242 this.yOffset = yOffset; 243 } 244 245 248 public boolean isShowLabels(){ 249 return isShowLabels; 250 } 251 252 255 public void setShowLabels( boolean isShowLabels ){ 256 this.isShowLabels = isShowLabels; 257 } 258 259 262 public void collectExpressions(JRExpressionCollector collector) 263 { 264 collector.collect(this); 265 } 266 267 } 268 | Popular Tags |