JSci.awt
Class Point2DListModel

java.lang.Object
  extended by JSci.awt.AbstractGraphModel
      extended by JSci.awt.Point2DListModel
All Implemented Interfaces:
Graph2DModel

public final class Point2DListModel
extends AbstractGraphModel
implements Graph2DModel

The Point2DListModel provides a convenient implementation of the Graph2DModel interface based upon a List of Point2D objects.


Constructor Summary
Point2DListModel()
           
 
Method Summary
 void firstSeries()
          Selects the first data series.
 float getXCoord(int i)
          Returns the x coordinate for the ith point.
 float getYCoord(int i)
          Returns the y coordinate for the ith point.
 boolean nextSeries()
          Selects the next data series.
 int seriesLength()
          Returns the number of data points in the current series.
 void setData(java.util.List points)
          Sets the list of points to be plotted.
 
Methods inherited from class JSci.awt.AbstractGraphModel
addGraphDataListener, fireGraphChanged, fireGraphDataChanged, fireGraphSeriesUpdated, removeGraphDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface JSci.awt.Graph2DModel
addGraphDataListener, removeGraphDataListener
 

Constructor Detail

Point2DListModel

public Point2DListModel()
Method Detail

setData

public void setData(java.util.List points)
Sets the list of points to be plotted.


getXCoord

public float getXCoord(int i)
Description copied from interface: Graph2DModel
Returns the x coordinate for the ith point.

Specified by:
getXCoord in interface Graph2DModel

getYCoord

public float getYCoord(int i)
Description copied from interface: Graph2DModel
Returns the y coordinate for the ith point.

Specified by:
getYCoord in interface Graph2DModel

seriesLength

public int seriesLength()
Description copied from interface: Graph2DModel
Returns the number of data points in the current series.

Specified by:
seriesLength in interface Graph2DModel

firstSeries

public void firstSeries()
Description copied from interface: Graph2DModel
Selects the first data series.

Specified by:
firstSeries in interface Graph2DModel

nextSeries

public boolean nextSeries()
Description copied from interface: Graph2DModel
Selects the next data series. Returns false if there is no next series.

Specified by:
nextSeries in interface Graph2DModel