org.jscience.awt
Class DefaultGraph3DModel

java.lang.Object
  extended by org.jscience.awt.AbstractGraphModel
      extended by org.jscience.awt.DefaultGraph3DModel
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TableModelListener, Graph3DModel

public final class DefaultGraph3DModel
extends AbstractGraphModel
implements Graph3DModel, javax.swing.event.TableModelListener

The DefaultGraph3DModel class provides a default implementation of the Graph3DModel interface.


Nested Class Summary
static class DefaultGraph3DModel.DataSeries
          The DataSeries class encapsulates a data series for a graph.
 
Constructor Summary
DefaultGraph3DModel()
          Creates a new DefaultGraph3DModel object.
 
Method Summary
 void addSeries(DefaultGraph3DModel.DataSeries newSeries)
          Adds a data series.
 void addSeries(float[] newSeries)
          Adds a data series.
 void changeSeries(int i, DefaultGraph3DModel.DataSeries newSeries)
          Changes a data series.
 void changeSeries(int i, float[] newSeries)
          Changes a data series.
 void firstSeries()
          DOCUMENT ME!
 DefaultGraph3DModel.DataSeries getSeries(int i)
          DOCUMENT ME!
 float getXCoord(int i)
          DOCUMENT ME!
 float getYCoord(int i)
          DOCUMENT ME!
 float getZCoord(int i)
          DOCUMENT ME!
 boolean nextSeries()
          DOCUMENT ME!
 void removeSeries(int i)
          Removes a data series.
 int seriesLength()
          DOCUMENT ME!
 void setSeriesVisible(int i, boolean flag)
          Convenience method.
 void setXAxis(float[] x)
          Sets the x-axis values.
 void setYAxis(float[] y)
          Sets the y-axis values.
 void tableChanged(javax.swing.event.TableModelEvent evt)
          Implementation of TabelModelListener.
 
Methods inherited from class org.jscience.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 org.jscience.awt.Graph3DModel
addGraphDataListener, removeGraphDataListener
 

Constructor Detail

DefaultGraph3DModel

public DefaultGraph3DModel()
Creates a new DefaultGraph3DModel object.

Method Detail

setXAxis

public void setXAxis(float[] x)
Sets the x-axis values. A copy of the values is made.

Parameters:
x - DOCUMENT ME!

setYAxis

public void setYAxis(float[] y)
Sets the y-axis values. A copy of the values is made.

Parameters:
y - DOCUMENT ME!

addSeries

public void addSeries(DefaultGraph3DModel.DataSeries newSeries)
Adds a data series.

Parameters:
newSeries - DOCUMENT ME!

addSeries

public void addSeries(float[] newSeries)
Adds a data series. Convenience method.

Parameters:
newSeries - DOCUMENT ME!

changeSeries

public void changeSeries(int i,
                         DefaultGraph3DModel.DataSeries newSeries)
Changes a data series.

Parameters:
i - DOCUMENT ME!
newSeries - DOCUMENT ME!

changeSeries

public void changeSeries(int i,
                         float[] newSeries)
Changes a data series. Convenience method.

Parameters:
i - DOCUMENT ME!
newSeries - DOCUMENT ME!

removeSeries

public void removeSeries(int i)
Removes a data series.

Parameters:
i - DOCUMENT ME!

getSeries

public DefaultGraph3DModel.DataSeries getSeries(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

setSeriesVisible

public void setSeriesVisible(int i,
                             boolean flag)
Convenience method.

Parameters:
i - DOCUMENT ME!
flag - DOCUMENT ME!

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent evt)
Implementation of TabelModelListener. Application code will not use this method explicitly, it is used internally.

Specified by:
tableChanged in interface javax.swing.event.TableModelListener
Parameters:
evt - DOCUMENT ME!

getXCoord

public float getXCoord(int i)
DOCUMENT ME!

Specified by:
getXCoord in interface Graph3DModel
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

getYCoord

public float getYCoord(int i)
DOCUMENT ME!

Specified by:
getYCoord in interface Graph3DModel
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

getZCoord

public float getZCoord(int i)
DOCUMENT ME!

Specified by:
getZCoord in interface Graph3DModel
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

seriesLength

public int seriesLength()
DOCUMENT ME!

Specified by:
seriesLength in interface Graph3DModel
Returns:
DOCUMENT ME!

firstSeries

public void firstSeries()
DOCUMENT ME!

Specified by:
firstSeries in interface Graph3DModel

nextSeries

public boolean nextSeries()
DOCUMENT ME!

Specified by:
nextSeries in interface Graph3DModel
Returns:
DOCUMENT ME!