SORTIE Java Interface  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sortie.datavisualizer.ModelHistogramDataset Class Reference

This is a hack of the HistogramDataset in JFreeChart. More...

Inheritance diagram for sortie.datavisualizer.ModelHistogramDataset:

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...
 

Detailed Description

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

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)

Member Function Documentation

◆ addSeries()

void sortie.datavisualizer.ModelHistogramDataset.addSeries ( String  sName,
float []  p_fValues,
int  iNumberOfBins,
float  fBinSize 
)

Adds a series.

Parameters
sNamethe series name.
p_fValuesthe values (null not permitted).
iNumberOfBinsthe number of bins (must be at least 1).
fBinSizethe size of the bins.

◆ addTotalSeries()

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.

◆ clone()

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.

Returns
The clone.

◆ getBins()

HistogramBin [] sortie.datavisualizer.ModelHistogramDataset.getBins ( int  series)
private

Returns the bins for a series.

Parameters
seriesthe series index.
Returns
An array of bins.

◆ getBinWidth()

float sortie.datavisualizer.ModelHistogramDataset.getBinWidth ( int  series)
private

Returns the total for a series.

Parameters
seriesthe series index.
Returns
The total. Returns the bin width for a series.
Parameters
seriesthe series index (zero based).
Returns
The bin width.

◆ getEndX()

Number sortie.datavisualizer.ModelHistogramDataset.getEndX ( int  series,
int  item 
)

Returns the end value for a bin.

Parameters
seriesthe series index (zero based).
itemthe item index (zero based).
Returns
The end value.

◆ getEndY()

Number sortie.datavisualizer.ModelHistogramDataset.getEndY ( int  series,
int  item 
)

Returns the Y value for a bin.

Parameters
seriesthe series index (zero based).
itemthe item index (zero based).
Returns
The Y value.

◆ getItemCount()

int sortie.datavisualizer.ModelHistogramDataset.getItemCount ( int  series)

Returns the number of data items for a series.

Parameters
seriesthe series index (zero based).
Returns
The item count.

◆ getSeriesCount()

int sortie.datavisualizer.ModelHistogramDataset.getSeriesCount ( )

Returns the number of series in the dataset.

Returns
The series count.

◆ getSeriesKey()

Comparable<String> sortie.datavisualizer.ModelHistogramDataset.getSeriesKey ( int  series)

Returns the name for a series.

Parameters
seriesthe series index (zero based).
Returns
The series name.

◆ getStartX()

Number sortie.datavisualizer.ModelHistogramDataset.getStartX ( int  series,
int  item 
)

Returns the start value for a bin.

Parameters
seriesthe series index (zero based).
itemthe item index (zero based).
Returns
The start value.

◆ getStartY()

Number sortie.datavisualizer.ModelHistogramDataset.getStartY ( int  series,
int  item 
)

Returns the Y value for a bin.

Parameters
seriesthe series index (zero based).
itemthe item index (zero based).
Returns
The Y value.

◆ getX()

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).

Parameters
seriesthe series index (zero based).
itemthe item index (zero based).
Returns
The start value.

◆ getY()

Number sortie.datavisualizer.ModelHistogramDataset.getY ( int  series,
int  item 
)

Returns the Y value for a bin.

Parameters
seriesthe series index (zero based).
itemthe item index (zero based) - i.e. bin number.
Returns
The Y value.

◆ removeSeries()

void sortie.datavisualizer.ModelHistogramDataset.removeSeries ( int  series)

I added this.

I wanted to be able to remove a series.

Parameters
seriesThe series index (zero based).

◆ setYValue()

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.

Parameters
seriesthe series index (zero based).
itemthe item index (zero based).
iValuethe new value to set.

Member Data Documentation

◆ list

List<Map<String, Object> > sortie.datavisualizer.ModelHistogramDataset.list = new ArrayList<Map<String, Object>>()
private

Histogram list.


The documentation for this class was generated from the following file: