SORTIE Java Interface
1
|
This is a hack of the HistogramDataset in JFreeChart. More...
Public Member Functions | |
void | addSeries (String sName, float[] p_fValues, int iNumberOfBins, float fBinSize) |
Adds a series. More... | |
void | addTotalSeries () |
Adds a series that is, for each bin, a total of the values of all other series' values in that bin. More... | |
int | getSeriesCount () |
Returns the number of series in the dataset. More... | |
Comparable< String > | getSeriesKey (int series) |
Returns the name for a series. More... | |
int | getItemCount (int series) |
Returns the number of data items for a series. More... | |
Number | getX (int series, int item) |
Returns the X value for a bin. More... | |
Number | getY (int series, int item) |
Returns the Y value for a bin. More... | |
void | setYValue (int series, int item, float iValue) |
Sets the Y value for a bin. More... | |
Number | getStartX (int series, int item) |
Returns the start value for a bin. More... | |
Number | getEndX (int series, int item) |
Returns the end value for a bin. More... | |
Number | getStartY (int series, int item) |
Returns the Y value for a bin. More... | |
Number | getEndY (int series, int item) |
Returns the Y value for a bin. More... | |
void | removeSeries (int series) |
I added this. More... | |
Object | clone () |
I added this. More... | |
Private Member Functions | |
HistogramBin [] | getBins (int series) |
Returns the bins for a series. More... | |
float | getBinWidth (int series) |
Returns the total for a series. More... | |
Private Attributes | |
List< Map< String, Object > > | list = new ArrayList<Map<String, Object>>() |
Histogram list. More... | |
This is a hack of the HistogramDataset in JFreeChart.
It did not suit my needs - particularly the ability to modify series. So I've made my own.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)
void sortie.datavisualizer.ModelHistogramDataset.addSeries | ( | String | sName, |
float [] | p_fValues, | ||
int | iNumberOfBins, | ||
float | fBinSize | ||
) |
Adds a series.
sName | the series name. |
p_fValues | the values (null not permitted). |
iNumberOfBins | the number of bins (must be at least 1). |
fBinSize | the size of the bins. |
void sortie.datavisualizer.ModelHistogramDataset.addTotalSeries | ( | ) |
Adds a series that is, for each bin, a total of the values of all other series' values in that bin.
Object sortie.datavisualizer.ModelHistogramDataset.clone | ( | ) |
I added this.
This creates a deep-enough clone of the dataset. The array list is cloned but not the underlying values - it is enough to be able to remove references in the clone. I don't need it deeper, so I didn't write it deeper.
|
private |
Returns the bins for a series.
series | the series index. |
|
private |
Returns the total for a series.
series | the series index. |
series | the series index (zero based). |
Number sortie.datavisualizer.ModelHistogramDataset.getEndX | ( | int | series, |
int | item | ||
) |
Returns the end value for a bin.
series | the series index (zero based). |
item | the item index (zero based). |
Number sortie.datavisualizer.ModelHistogramDataset.getEndY | ( | int | series, |
int | item | ||
) |
Returns the Y value for a bin.
series | the series index (zero based). |
item | the item index (zero based). |
int sortie.datavisualizer.ModelHistogramDataset.getItemCount | ( | int | series | ) |
Returns the number of data items for a series.
series | the series index (zero based). |
int sortie.datavisualizer.ModelHistogramDataset.getSeriesCount | ( | ) |
Returns the number of series in the dataset.
Comparable<String> sortie.datavisualizer.ModelHistogramDataset.getSeriesKey | ( | int | series | ) |
Returns the name for a series.
series | the series index (zero based). |
Number sortie.datavisualizer.ModelHistogramDataset.getStartX | ( | int | series, |
int | item | ||
) |
Returns the start value for a bin.
series | the series index (zero based). |
item | the item index (zero based). |
Number sortie.datavisualizer.ModelHistogramDataset.getStartY | ( | int | series, |
int | item | ||
) |
Returns the Y value for a bin.
series | the series index (zero based). |
item | the item index (zero based). |
Number sortie.datavisualizer.ModelHistogramDataset.getX | ( | int | series, |
int | item | ||
) |
Returns the X value for a bin.
This value won't be used for plotting histograms, since the renderer will ignore it. But other renderers can use it (for example, you could use the dataset to create a line chart).
series | the series index (zero based). |
item | the item index (zero based). |
Number sortie.datavisualizer.ModelHistogramDataset.getY | ( | int | series, |
int | item | ||
) |
Returns the Y value for a bin.
series | the series index (zero based). |
item | the item index (zero based) - i.e. bin number. |
void sortie.datavisualizer.ModelHistogramDataset.removeSeries | ( | int | series | ) |
I added this.
I wanted to be able to remove a series.
series | The series index (zero based). |
void sortie.datavisualizer.ModelHistogramDataset.setYValue | ( | int | series, |
int | item, | ||
float | iValue | ||
) |
Sets the Y value for a bin.
Added by Lora to allow for adjusting values to be per hectare.
series | the series index (zero based). |
item | the item index (zero based). |
iValue | the new value to set. |
|
private |
Histogram list.