|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.xy.AbstractXYDataset
org.jfree.data.xy.AbstractIntervalXYDataset
org.jfree.data.statistics.SimpleHistogramDataset
public class SimpleHistogramDataset
A dataset used for creating simple histograms with custom defined bins.
HistogramDataset,
Serialized Form| Constructor Summary | |
|---|---|
SimpleHistogramDataset(java.lang.Comparable key)
Creates a new histogram dataset. |
|
| Method Summary | |
|---|---|
void |
addBin(SimpleHistogramBin bin)
Adds a bin to the dataset. |
void |
addObservation(double value)
Adds an observation to the dataset (by incrementing the item count for the appropriate bin). |
void |
addObservation(double value,
boolean notify)
Adds an observation to the dataset (by incrementing the item count for the appropriate bin). |
void |
addObservations(double[] values)
Adds a set of values to the dataset and sends a DatasetChangeEvent to all registered listeners. |
void |
clearObservations()
Removes all current observation data and sends a DatasetChangeEvent to all registered listeners. |
java.lang.Object |
clone()
Returns a clone of the dataset. |
boolean |
equals(java.lang.Object obj)
Compares the dataset for equality with an arbitrary object. |
boolean |
getAdjustForBinSize()
Returns a flag that controls whether or not the bin count is divided by the bin size in the getXValue(int, int) method. |
DomainOrder |
getDomainOrder()
Returns the order of the domain (or X) values returned by the dataset. |
java.lang.Number |
getEndX(int series,
int item)
Returns the ending X value for the specified series and item. |
double |
getEndXValue(int series,
int item)
Returns the end x-value (as a double primitive) for an item within a series. |
java.lang.Number |
getEndY(int series,
int item)
Returns the ending Y value for the specified series and item. |
double |
getEndYValue(int series,
int item)
Returns the end y-value (as a double primitive) for an item within a series. |
int |
getItemCount(int series)
Returns the number of items in a series. |
int |
getSeriesCount()
Returns the number of series in the dataset (always 1 for this dataset). |
java.lang.Comparable |
getSeriesKey(int series)
Returns the key for a series. |
java.lang.Number |
getStartX(int series,
int item)
Returns the starting X value for the specified series and item. |
double |
getStartXValue(int series,
int item)
Returns the start x-value (as a double primitive) for an item within a series. |
java.lang.Number |
getStartY(int series,
int item)
Returns the starting Y value for the specified series and item. |
double |
getStartYValue(int series,
int item)
Returns the start y-value (as a double primitive) for an item within a series. |
java.lang.Number |
getX(int series,
int item)
Returns the x-value for an item within a series. |
double |
getXValue(int series,
int item)
Returns the x-value (as a double primitive) for an item within a series. |
java.lang.Number |
getY(int series,
int item)
Returns the y-value for an item within a series. |
double |
getYValue(int series,
int item)
Returns the y-value (as a double primitive) for an item within a series. |
void |
removeAllBins()
Removes all bins and sends a DatasetChangeEvent to all
registered listeners. |
void |
setAdjustForBinSize(boolean adjust)
Sets the flag that controls whether or not the bin count is divided by the bin size in the getYValue(int, int) method, and sends a
DatasetChangeEvent to all registered listeners. |
| Methods inherited from class org.jfree.data.general.AbstractSeriesDataset |
|---|
indexOf, seriesChanged |
| Methods inherited from class org.jfree.data.general.AbstractDataset |
|---|
addChangeListener, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObject |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jfree.data.general.SeriesDataset |
|---|
indexOf |
| Methods inherited from interface org.jfree.data.general.Dataset |
|---|
addChangeListener, getGroup, removeChangeListener, setGroup |
| Constructor Detail |
|---|
public SimpleHistogramDataset(java.lang.Comparable key)
adjustForBinSize flag defaults to true.
key - the series key (null not permitted).| Method Detail |
|---|
public boolean getAdjustForBinSize()
getXValue(int, int) method.
setAdjustForBinSize(boolean)public void setAdjustForBinSize(boolean adjust)
getYValue(int, int) method, and sends a
DatasetChangeEvent to all registered listeners.
adjust - the flag.getAdjustForBinSize()public int getSeriesCount()
getSeriesCount in interface SeriesDatasetgetSeriesCount in class AbstractSeriesDatasetpublic java.lang.Comparable getSeriesKey(int series)
series argument is ignored.
getSeriesKey in interface SeriesDatasetgetSeriesKey in class AbstractSeriesDatasetseries - the series (zero-based index, ignored in this dataset).
public DomainOrder getDomainOrder()
getDomainOrder in interface XYDatasetgetDomainOrder in class AbstractXYDatasetnull).public int getItemCount(int series)
series argument is ignored.
getItemCount in interface XYDatasetseries - the series index (zero-based, ignored in this dataset).
public void addBin(SimpleHistogramBin bin)
bin - the bin (null not permitted).removeAllBins()public void addObservation(double value)
value - the value.
public void addObservation(double value,
boolean notify)
value - the value.notify - send DatasetChangeEvent to listeners?public void addObservations(double[] values)
DatasetChangeEvent to all registered listeners.
values - the values (null not permitted).clearObservations()public void clearObservations()
DatasetChangeEvent to all registered listeners.
addObservations(double[]),
removeAllBins()public void removeAllBins()
DatasetChangeEvent to all
registered listeners.
addBin(SimpleHistogramBin)
public java.lang.Number getX(int series,
int item)
getX in interface XYDatasetseries - the series index (zero-based).item - the item index (zero-based).
null).
public double getXValue(int series,
int item)
getXValue in interface XYDatasetgetXValue in class AbstractXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public java.lang.Number getY(int series,
int item)
getY in interface XYDatasetseries - the series index (zero-based).item - the item index (zero-based).
null).
public double getYValue(int series,
int item)
getYValue in interface XYDatasetgetYValue in class AbstractXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
getAdjustForBinSize()
public java.lang.Number getStartX(int series,
int item)
getStartX in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public double getStartXValue(int series,
int item)
getStartXValue in interface IntervalXYDatasetgetStartXValue in class AbstractIntervalXYDatasetseries - the series (zero-based index).item - the item (zero-based index).
public java.lang.Number getEndX(int series,
int item)
getEndX in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public double getEndXValue(int series,
int item)
getEndXValue in interface IntervalXYDatasetgetEndXValue in class AbstractIntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public java.lang.Number getStartY(int series,
int item)
getStartY in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public double getStartYValue(int series,
int item)
getStartYValue in interface IntervalXYDatasetgetStartYValue in class AbstractIntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public java.lang.Number getEndY(int series,
int item)
getEndY in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public double getEndYValue(int series,
int item)
getEndYValue in interface IntervalXYDatasetgetEndYValue in class AbstractIntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class AbstractDatasetjava.lang.CloneNotSupportedException - not thrown by this class, but maybe
by subclasses (if any).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||