1 28 package net.sf.jasperreports.charts.base; 29 30 import java.awt.Color ; 31 32 import net.sf.jasperreports.charts.JRBubblePlot; 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.xy.XYBubbleRenderer; 42 43 47 public class JRBaseBubblePlot extends JRBaseChartPlot implements JRBubblePlot { 48 49 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 50 51 protected JRExpression xAxisLabelExpression = null; 52 protected JRFont xAxisLabelFont = null; 53 protected Color xAxisLabelColor = null; 54 protected JRFont xAxisTickLabelFont = null; 55 protected Color xAxisTickLabelColor = null; 56 protected String xAxisTickLabelMask = null; 57 protected Color xAxisLineColor = null; 58 59 protected JRExpression yAxisLabelExpression = null; 60 protected JRFont yAxisLabelFont = null; 61 protected Color yAxisLabelColor = null; 62 protected JRFont yAxisTickLabelFont = null; 63 protected Color yAxisTickLabelColor = null; 64 protected String yAxisTickLabelMask = null; 65 protected Color yAxisLineColor = null; 66 67 protected int scaleType = XYBubbleRenderer.SCALE_ON_RANGE_AXIS; 68 69 70 73 public JRBaseBubblePlot( JRChartPlot bubblePlot){ 74 super( bubblePlot); 75 } 76 77 78 81 public JRBaseBubblePlot( JRBubblePlot bubblePlot, JRBaseObjectFactory factory ){ 82 super( bubblePlot, factory ); 83 84 scaleType = bubblePlot.getScaleType(); 85 86 xAxisLabelExpression = factory.getExpression( bubblePlot.getXAxisLabelExpression() ); 87 xAxisLabelFont = factory.getFont(bubblePlot.getXAxisLabelFont()); 88 xAxisLabelColor = bubblePlot.getXAxisLabelColor(); 89 xAxisTickLabelFont = factory.getFont(bubblePlot.getXAxisTickLabelFont()); 90 xAxisTickLabelColor = bubblePlot.getXAxisTickLabelColor(); 91 xAxisTickLabelMask = bubblePlot.getXAxisTickLabelMask(); 92 xAxisLineColor = bubblePlot.getXAxisLineColor(); 93 94 yAxisLabelExpression = factory.getExpression( bubblePlot.getYAxisLabelExpression() ); 95 yAxisLabelFont = factory.getFont(bubblePlot.getYAxisLabelFont()); 96 yAxisLabelColor = bubblePlot.getYAxisLabelColor(); 97 yAxisTickLabelFont = factory.getFont(bubblePlot.getYAxisTickLabelFont()); 98 yAxisTickLabelColor = bubblePlot.getYAxisTickLabelColor(); 99 yAxisTickLabelMask = bubblePlot.getYAxisTickLabelMask(); 100 yAxisLineColor = bubblePlot.getYAxisLineColor(); 101 } 102 103 106 public JRExpression getXAxisLabelExpression(){ 107 return xAxisLabelExpression; 108 } 109 110 113 public JRFont getXAxisLabelFont() 114 { 115 return xAxisLabelFont; 116 } 117 118 121 public Color getXAxisLabelColor() 122 { 123 return xAxisLabelColor; 124 } 125 126 129 public JRFont getXAxisTickLabelFont() 130 { 131 return xAxisTickLabelFont; 132 } 133 134 137 public Color getXAxisTickLabelColor() 138 { 139 return xAxisTickLabelColor; 140 } 141 142 145 public String getXAxisTickLabelMask() 146 { 147 return xAxisTickLabelMask; 148 } 149 150 153 public Color getXAxisLineColor() 154 { 155 return xAxisLineColor; 156 } 157 158 161 public JRExpression getYAxisLabelExpression(){ 162 return yAxisLabelExpression; 163 } 164 165 168 public JRFont getYAxisLabelFont() 169 { 170 return yAxisLabelFont; 171 } 172 173 176 public Color getYAxisLabelColor() 177 { 178 return yAxisLabelColor; 179 } 180 181 184 public JRFont getYAxisTickLabelFont() 185 { 186 return yAxisTickLabelFont; 187 } 188 189 192 public Color getYAxisTickLabelColor() 193 { 194 return yAxisTickLabelColor; 195 } 196 197 200 public String getYAxisTickLabelMask() 201 { 202 return yAxisTickLabelMask; 203 } 204 205 208 public Color getYAxisLineColor() 209 { 210 return yAxisLineColor; 211 } 212 213 216 public int getScaleType(){ 217 return scaleType; 218 } 219 220 223 public void setScaleType( int scaleType ){ 224 this.scaleType = scaleType; 225 } 226 227 230 public void collectExpressions(JRExpressionCollector collector) 231 { 232 collector.collect(this); 233 } 234 235 } 236 | Popular Tags |