org.opensourcephysics.display
Class HistogramDataset

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

public class HistogramDataset
extends Dataset

HistogramDataset creates a histogram of appended data points.

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

Field Summary
 
Fields inherited from class org.opensourcephysics.display.Dataset
AREA, BAR, CIRCLE, CUSTOM, NO_MARKER, PIXEL, POST, SQUARE
 
Constructor Summary
HistogramDataset(double binMin, double binMax, double binSize)
          Constructor HistogramDataset
 
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 data from the histogram.
static XML.ObjectLoader getLoader()
          Returns the XML.ObjectLoader for this class.
 double getXMax()
          Gets the x world coordinate for the right hand side of the panel.
 double getXMin()
          Gets the x world coordinate for the left hand side of the panel.
 void setBinWidth(double binMin, double binMax, double binSize)
           
 
Methods inherited from class org.opensourcephysics.display.Dataset
append, append, convertTableColumnIndex, countColumnsVisible, draw, 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, getXMaxLogscale, getXMinLogscale, getXPoints, getYColumnName, getYMax, getYMaxLogscale, getYMin, getYMinLogscale, getYPoints, isConnected, isMeasured, isSorted, isXColumnVisible, isYColumnVisible, read, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HistogramDataset

public HistogramDataset(double binMin,
                        double binMax,
                        double binSize)
Constructor HistogramDataset

Parameters:
binMin -
binMax -
binSize -
Method Detail

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 -

getXMin

public double getXMin()
Gets the x world coordinate for the left hand side of the panel.

Specified by:
getXMin in interface Measurable
Overrides:
getXMin in class Dataset
Returns:
xmin

getXMax

public double getXMax()
Gets the x world coordinate for the right hand side of the panel.

Specified by:
getXMax in interface Measurable
Overrides:
getXMax in class Dataset
Returns:
xmax

setBinWidth

public void setBinWidth(double binMin,
                        double binMax,
                        double binSize)

clear

public void clear()
Clears data from the histogram.

Overrides:
clear in class Dataset

getLoader

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

Returns:
the object loader