01: /*
02: JOpenChart Java Charting Library and Toolkit
03: Copyright (C) 2001 Sebastian Müller
04: http://jopenchart.sourceforge.net
05:
06: This library is free software; you can redistribute it and/or
07: modify it under the terms of the GNU Lesser General Public
08: License as published by the Free Software Foundation; either
09: version 2.1 of the License, or (at your option) any later version.
10:
11: This library is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: Lesser General Public License for more details.
15:
16: You should have received a copy of the GNU Lesser General Public
17: License along with this library; if not, write to the Free Software
18: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19:
20: DataSet.java
21: Created on 1. Juli 2001, 21:04
22: */
23:
24: package de.progra.charting.model;
25:
26: /**
27: * An interface used to encapsulate the DataSets in a ChartDataModel.
28: * It's main objective is to store a DataSet to Axis binding.
29: * @author mueller
30: * @version 1.0
31: */
32: public interface DataSet {
33:
34: /** Determines the length of the DataSet
35: * @return an int equal to the length
36: */
37: public int getDataSetLength();
38:
39: /** Determines the column value at a specific DataSet index.
40: * @param index the column index
41: * @return an Object with the column value
42: */
43: public Object getColumnValueAt(int index);
44:
45: /** Sets the column value
46: * @param index the column index
47: * @param col the column value
48: */
49: public void setColumnValueAt(int index, Object col);
50:
51: /** Returns a value in the DataSet
52: * @param index the DataSet index
53: * @return an Object with the value.
54: */
55: public Object getValueAt(int index);
56:
57: /** Stores a value in the DataSet.
58: * @param index the DataSet index
59: * @param val the value to be stored
60: */
61: public void setValueAt(int index, Object val);
62:
63: /** Sets the axis this DataSet is attached to.
64: * @param yaxis the axis constant.
65: */
66: public void setYAxis(int yaxis);
67:
68: /** Returns the axis to which this DataSet is attached.
69: * @return the axis constant
70: */
71: public int getYAxis();
72:
73: /** Returns the Title of the DataSet.
74: * @return a String containing the DataSet's title.
75: */
76: public String getTitle();
77:
78: /** Sets the DataSet's title.
79: * @param title the String title for the DataSet
80: */
81: public void setTitle(String title);
82: }
|