org.opensourcephysics.display
Class Stripchart

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.opensourcephysics.display.Dataset
          extended by org.opensourcephysics.display.Stripchart
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel, Data, Drawable, LogMeasurable, Measurable

public class Stripchart
extends Dataset

Stripchart stores data having increasing x values. Only data within the interval [lastx-xrange, lastx] is retained.

Version:
1.0
Author:
Wolfgang Christian
See Also:
Serialized Form

Nested Class Summary
protected static class Stripchart.StripchartLoader
           
 
Nested classes/interfaces inherited from class org.opensourcephysics.display.Dataset
Dataset.Loader
 
Field Summary
 
Fields inherited from class org.opensourcephysics.display.Dataset
AREA, BAR, CIRCLE, columnID, CUSTOM, customMarker, datasetID, errorBars, generalPath, index, maxPoints, NO_MARKER, PIXEL, POST, sorted, SQUARE, visible, xmax, xmaxLogscale, xmin, xminLogscale, xpoints, ymax, ymaxLogscale, ymin, yminLogscale, ypoints
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
protected Stripchart()
          Constructs a Stripchart for use by the XML loader.
  Stripchart(double _xrange, double _yrange)
          Constructs a Stripchart witht he given ranges.
 
Method Summary
 void append(double[] _xpoints, double[] _ypoints)
          Appends (x,y) data-arrays to the Stipchart.
 void append(double x, double y)
          Appends an (x,y) datum to the Stipchart.
 void clear()
          Clears all data from this Dataset.
 void enable(boolean enabled)
           
static XML.ObjectLoader getLoader()
          Returns the XML.ObjectLoader for this class.
 void setRange(double _xrange, double _yrange)
          Sets the range of the stipchart.
 
Methods inherited from class org.opensourcephysics.display.Dataset
append, append, convertTableColumnIndex, countColumnsVisible, draw, drawFilledPlot, drawLinePlot, drawScatterPlot, getColumnClass, getColumnCount, getColumnID, getColumnName, getColumnNames, getData2D, getData3D, getDataList, getDatasets, getEdgeColor, getFillColor, getFillColors, getID, getIndex, getLineColor, getLineColors, getMarkerShape, getMarkerSize, getName, getPoints, getRowCount, getValidXPoints, getValidYPoints, getValueAt, getVisible, getXColumnName, getXMax, getXMaxLogscale, getXMin, getXMinLogscale, getXPoints, getYColumnName, getYMax, getYMaxLogscale, getYMin, getYMinLogscale, getYPoints, insertionSort, isConnected, isMeasured, isSorted, isXColumnVisible, isYColumnVisible, moveDatum, read, recalculatePath, setColumnID, setConnected, setCustomMarker, setID, setLineColor, setMarkerColor, setMarkerColor, setMarkerColor, setMarkerShape, setMarkerSize, setMaximumPoints, setName, setSorted, setStride, setVisible, setXColumnVisible, setXYColumnNames, setXYColumnNames, setYColumnVisible, toString, write
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Stripchart

public Stripchart(double _xrange,
                  double _yrange)
Constructs a Stripchart witht he given ranges.

Parameters:
_xrange - double
_yrange - double

Stripchart

protected Stripchart()
Constructs a Stripchart for use by the XML loader.

Method Detail

setRange

public void setRange(double _xrange,
                     double _yrange)
Sets the range of the stipchart.

Parameters:
_xrange - double
_yrange - double

enable

public void enable(boolean enabled)

append

public void append(double x,
                   double y)
Appends an (x,y) datum to the Stipchart.

Overrides:
append in class Dataset
Parameters:
x -
y -

append

public void append(double[] _xpoints,
                   double[] _ypoints)
Appends (x,y) data-arrays to the Stipchart.

Overrides:
append in class Dataset
Parameters:
_xpoints -
_ypoints -

clear

public void clear()
Clears all data from this Dataset.

Overrides:
clear in class Dataset

getLoader

public static XML.ObjectLoader getLoader()
Returns the XML.ObjectLoader for this class.

Returns:
the object loader