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

Nested Class Summary
protected static class HistogramDataset.HistogramDatasetLoader
           
 
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 HistogramDataset()
          Constructs a HistogramDataset for values from 0 through 100.
  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, 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, getXMaxLogscale, 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

HistogramDataset

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

Parameters:
binMin -
binMax -
binSize -

HistogramDataset

protected HistogramDataset()
Constructs a HistogramDataset for values from 0 through 100.

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