1 28 package net.sf.jasperreports.charts.base; 29 30 import net.sf.jasperreports.charts.JRHighLowDataset; 31 import net.sf.jasperreports.engine.JRChartDataset; 32 import net.sf.jasperreports.engine.JRConstants; 33 import net.sf.jasperreports.engine.JRExpression; 34 import net.sf.jasperreports.engine.JRExpressionCollector; 35 import net.sf.jasperreports.engine.JRHyperlink; 36 import net.sf.jasperreports.engine.base.JRBaseChartDataset; 37 import net.sf.jasperreports.engine.base.JRBaseObjectFactory; 38 import net.sf.jasperreports.engine.design.JRVerifier; 39 40 41 45 public class JRBaseHighLowDataset extends JRBaseChartDataset implements JRHighLowDataset 46 { 47 48 51 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 52 53 protected JRExpression seriesExpression; 54 protected JRExpression dateExpression; 55 protected JRExpression highExpression; 56 protected JRExpression lowExpression; 57 protected JRExpression openExpression; 58 protected JRExpression closeExpression; 59 protected JRExpression volumeExpression; 60 private JRHyperlink itemHyperlink; 61 62 63 66 public JRBaseHighLowDataset(JRChartDataset dataset) 67 { 68 super(dataset); 69 } 70 71 72 75 public JRBaseHighLowDataset(JRHighLowDataset dataset, JRBaseObjectFactory factory) 76 { 77 super(dataset, factory); 78 79 seriesExpression = factory.getExpression(dataset.getSeriesExpression()); 80 dateExpression = factory.getExpression(dataset.getDateExpression()); 81 highExpression = factory.getExpression(dataset.getHighExpression()); 82 lowExpression = factory.getExpression(dataset.getLowExpression()); 83 openExpression = factory.getExpression(dataset.getOpenExpression()); 84 closeExpression = factory.getExpression(dataset.getCloseExpression()); 85 volumeExpression = factory.getExpression(dataset.getVolumeExpression()); 86 itemHyperlink = factory.getHyperlink(dataset.getItemHyperlink()); 87 } 88 89 90 91 public JRExpression getSeriesExpression() 92 { 93 return seriesExpression; 94 } 95 96 97 public JRExpression getDateExpression() 98 { 99 return dateExpression; 100 } 101 102 103 public JRExpression getHighExpression() 104 { 105 return highExpression; 106 } 107 108 109 public JRExpression getLowExpression() 110 { 111 return lowExpression; 112 } 113 114 115 public JRExpression getOpenExpression() 116 { 117 return openExpression; 118 } 119 120 121 public JRExpression getCloseExpression() 122 { 123 return closeExpression; 124 } 125 126 public JRExpression getVolumeExpression() 127 { 128 return volumeExpression; 129 } 130 131 132 135 public byte getDatasetType() { 136 return JRChartDataset.HIGHLOW_DATASET; 137 } 138 139 140 143 public void collectExpressions(JRExpressionCollector collector) 144 { 145 collector.collect(this); 146 } 147 148 149 public JRHyperlink getItemHyperlink() 150 { 151 return itemHyperlink; 152 } 153 154 155 public void validate(JRVerifier verifier) 156 { 157 verifier.verify(this); 158 } 159 160 } 161 | Popular Tags |