KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > awt > Graph2DModel


1 package JSci.awt;
2
3 /**
4 * This is a generic interface for sending data to 2D graphs.
5 * @version 1.0
6 * @author Mark Hale
7 */

8 public interface Graph2DModel {
9         /**
10         * Add a listener.
11         */

12         void addGraphDataListener(GraphDataListener l);
13         /**
14         * Remove a listener.
15         */

16         void removeGraphDataListener(GraphDataListener l);
17         /**
18         * Returns the x coordinate for the ith point.
19         */

20         float getXCoord(int i);
21         /**
22         * Returns the y coordinate for the ith point.
23         */

24         float getYCoord(int i);
25         /**
26         * Returns the number of data points in the current series.
27         */

28         int seriesLength();
29         /**
30         * Selects the first data series.
31         */

32         void firstSeries();
33         /**
34         * Selects the next data series.
35         * Returns false if there is no next series.
36         */

37         boolean nextSeries();
38 }
39
40
Popular Tags