001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.charts.design;
029:
030: import net.sf.jasperreports.charts.JRHighLowDataset;
031: import net.sf.jasperreports.engine.JRChartDataset;
032: import net.sf.jasperreports.engine.JRConstants;
033: import net.sf.jasperreports.engine.JRExpression;
034: import net.sf.jasperreports.engine.JRExpressionCollector;
035: import net.sf.jasperreports.engine.JRHyperlink;
036: import net.sf.jasperreports.engine.design.JRDesignChartDataset;
037: import net.sf.jasperreports.engine.design.JRVerifier;
038:
039: /**
040: * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
041: * @version $Id: JRDesignHighLowDataset.java 1364 2006-08-31 15:13:20Z lucianc $
042: */
043: public class JRDesignHighLowDataset extends JRDesignChartDataset
044: implements JRHighLowDataset {
045:
046: /**
047: *
048: */
049: private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
050:
051: protected JRExpression seriesExpression;
052: protected JRExpression dateExpression;
053: protected JRExpression highExpression;
054: protected JRExpression lowExpression;
055: protected JRExpression openExpression;
056: protected JRExpression closeExpression;
057: protected JRExpression volumeExpression;
058: private JRHyperlink itemHyperlink;
059:
060: /**
061: *
062: */
063: public JRDesignHighLowDataset(JRChartDataset dataset) {
064: super (dataset);
065: }
066:
067: public JRExpression getSeriesExpression() {
068: return seriesExpression;
069: }
070:
071: public void setSeriesExpression(JRExpression seriesExpression) {
072: this .seriesExpression = seriesExpression;
073: }
074:
075: public JRExpression getDateExpression() {
076: return dateExpression;
077: }
078:
079: public void setDateExpression(JRExpression dateExpression) {
080: this .dateExpression = dateExpression;
081: }
082:
083: public JRExpression getHighExpression() {
084: return highExpression;
085: }
086:
087: public void setHighExpression(JRExpression highExpression) {
088: this .highExpression = highExpression;
089: }
090:
091: public JRExpression getLowExpression() {
092: return lowExpression;
093: }
094:
095: public void setLowExpression(JRExpression lowExpression) {
096: this .lowExpression = lowExpression;
097: }
098:
099: public JRExpression getOpenExpression() {
100: return openExpression;
101: }
102:
103: public void setOpenExpression(JRExpression openExpression) {
104: this .openExpression = openExpression;
105: }
106:
107: public JRExpression getCloseExpression() {
108: return closeExpression;
109: }
110:
111: public void setCloseExpression(JRExpression closeExpression) {
112: this .closeExpression = closeExpression;
113: }
114:
115: public JRExpression getVolumeExpression() {
116: return volumeExpression;
117: }
118:
119: public void setVolumeExpression(JRExpression volumeExpression) {
120: this .volumeExpression = volumeExpression;
121: }
122:
123: /**
124: *
125: */
126: public byte getDatasetType() {
127: return JRChartDataset.HIGHLOW_DATASET;
128: }
129:
130: /**
131: *
132: */
133: public void collectExpressions(JRExpressionCollector collector) {
134: collector.collect(this );
135: }
136:
137: public JRHyperlink getItemHyperlink() {
138: return itemHyperlink;
139: }
140:
141: /**
142: * Sets the hyperlink specification for chart items.
143: *
144: * @param itemHyperlink the hyperlink specification
145: * @see #getItemHyperlink()
146: */
147: public void setItemHyperlink(JRHyperlink itemHyperlink) {
148: this .itemHyperlink = itemHyperlink;
149: }
150:
151: public void validate(JRVerifier verifier) {
152: verifier.verify(this);
153: }
154:
155: }
|