1 28 package net.sf.jasperreports.charts.base; 29 30 import net.sf.jasperreports.charts.JRDataRange; 31 import net.sf.jasperreports.engine.JRConstants; 32 import net.sf.jasperreports.engine.JRExpression; 33 import net.sf.jasperreports.engine.JRExpressionCollector; 34 import net.sf.jasperreports.engine.base.JRBaseObjectFactory; 35 36 import java.io.Serializable ; 37 38 45 public class JRBaseDataRange implements JRDataRange, Serializable 46 { 47 50 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 51 52 55 protected JRExpression lowExpression = null; 56 57 60 protected JRExpression highExpression = null; 61 62 63 68 public JRBaseDataRange(JRDataRange dataRange) 69 { 70 if (dataRange != null) 71 { 72 this.lowExpression = dataRange.getLowExpression(); 73 this.highExpression = dataRange.getHighExpression(); 74 } 75 } 76 77 85 public JRBaseDataRange(JRDataRange dataRange, JRBaseObjectFactory factory) 86 { 87 factory.put(dataRange, this); 88 89 lowExpression = factory.getExpression(dataRange.getLowExpression()); 90 highExpression = factory.getExpression(dataRange.getHighExpression()); 91 } 92 93 94 97 public JRExpression getLowExpression() 98 { 99 return lowExpression; 100 } 101 104 public JRExpression getHighExpression() 105 { 106 return highExpression; 107 } 108 109 110 117 public void collectExpressions(JRExpressionCollector collector) 118 { 119 collector.collect(this); 120 } 121 122 } 123 | Popular Tags |