Public Member Functions | |
HistogramDataRequest (String sLabel, boolean bIsFloat, DetailedOutputFileManager oManager, String sGraphName, int iDeadCode) | |
Constructor. | |
void | actionPerformed (ActionEvent oEvent) |
Performs actions for the controls in the Histogram window. | |
float | GetBinSize () |
Gets the bin size for this data request's histogram. | |
boolean | GetUseLogarithmicAxis () |
Gets whether or not to use a logarithmic axis. | |
void | AddTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) |
If the label matches the one given in the constructor, and the data being histogrammed is a float, this captures the values passed. | |
void | AddTreeIntData (int iSpecies, int iType, int iCode, int iVal) |
This will add the integer data, if the data for this chart is an int that matches the data member code. | |
void | AddDeadTreeIntData (int iSpecies, int iType, int iCode, int iDeadCode, int iVal) |
This will add the integer data, if the data for this chart is an int that matches the data member code. | |
void | AddTreeIntDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) |
If the label matches the one given in the constructor, and the data being histogrammed is an int, this captures the values passed. | |
boolean | WantAnyTreeInts () |
If our data piece that's being graphed is an integer, this returns true. | |
boolean | WantAnyDeadTreeInts () |
If our data piece that's being graphed is an integer, this returns true. | |
boolean | WantAnyTreeFloats () |
If our data piece that's being graphed is a float, this returns true. | |
boolean | WantAnyDeadTreeFloats () |
If our data piece that's being graphed is a float, this returns true. | |
void | AddTreeFloatData (int iSpecies, int iType, int iCode, float fVal) |
This will add the float data, if the data for this chart is a float that matches the data member code. | |
void | AddDeadTreeFloatData (int iSpecies, int iType, int iCode, int iDeadCode, float fVal) |
Accepts a tree float data member value. | |
Protected Member Functions | |
void | WriteChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException |
Writes the histogram's data to tab-delimited text. | |
ModelHistogramDataset | UpdateForVisible (Legend oLegend) throws ModelException |
Copies our dataset and includes only species marked as visible in the legend. | |
void | AddSeriesToDataset () throws ModelException |
This will add all series to the dataset. | |
Protected Attributes | |
ModelHistogramDataset | m_oDataset |
The dataset that will be graphed. | |
Package Functions | |
ModelInternalFrame | DrawChart (Legend oLegend, String sChartTitle) throws ModelException |
Creates the histogram using data accumulated thus far. | |
void | UpdateChart (Legend oLegend) throws ModelException |
Updates the histogram. | |
void | ClearData () |
This nulls our dataset and recreates it, and clears all of our data vectors. | |
Private Attributes | |
String | m_sLabel |
Data member's label, as it appears in the detailed output file. | |
boolean | m_bIsFloat |
Whether our data member being graphed is a float. | |
boolean | m_bIsInt |
Whether our data member being graphed is an integer. | |
boolean[] | mp_bInclude |
Whether to include each tree type. | |
JTextField | m_jNumBins = new JTextField("") |
Field displaying the number of bins in the histogram. | |
JTextField | m_jBinSize = new JTextField("") |
Field displaying the bin size in the histogram. | |
int[][] | mp_iDataMemberCodes |
The data member codes for this data member - one per species / type. | |
ArrayList< ArrayList < ArrayList< Number > > > | mp_oData |
The data - kept in an array of vectors - one per species, per type. | |
float | m_fPlotAreaInHectares |
Plot area in hectares. | |
float | m_fBinSize |
Size of the histogram bins. | |
int | m_iNumBins |
Number of bins in the histogram. | |
int | m_iDeadCode |
Dead code for trees (including NOTDEAD). | |
boolean | m_bUseLogarithmicAxis |
Whether or not to use a logarithmic axis on the Y. | |
boolean | m_bRecalcBinsOnUpdate |
Whether or not we have to recalculate the bins on chart update (i.e. | |
boolean | m_bShowTotal = true |
Whether or not to display a total bar in each bin. |
The label of the data is passed in the constructor. The histogram is defaulted to 10 divisions equally divided between their minimum and maximum values. This can graph either live or dead tree data values.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
datavisualizer.HistogramDataRequest.HistogramDataRequest | ( | String | sLabel, | |
boolean | bIsFloat, | |||
DetailedOutputFileManager | oManager, | |||
String | sGraphName, | |||
int | iDeadCode | |||
) |
Constructor.
sLabel | Label of the piece of data, as it would be passed as a data member code. | |
bIsFloat | Whether this is float data. If this is set to false, integer data is assumed. | |
oManager | The parent detailed output file manager. | |
sGraphName | Name of graph string. | |
iDeadCode | Dead code for trees (including NOTDEAD). |
void datavisualizer.HistogramDataRequest.WriteChartDataToFile | ( | java.io.FileWriter | jOut | ) | throws java.io. IOException [protected, virtual] |
Writes the histogram's data to tab-delimited text.
jOut | java.io.FileWriter The file to write to. |
java.io.IOException | if there's a problem writing the file. |
Implements datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.actionPerformed | ( | ActionEvent | oEvent | ) |
Performs actions for the controls in the Histogram window.
oEvent | Event triggered. |
float datavisualizer.HistogramDataRequest.GetBinSize | ( | ) |
Gets the bin size for this data request's histogram.
boolean datavisualizer.HistogramDataRequest.GetUseLogarithmicAxis | ( | ) |
Gets whether or not to use a logarithmic axis.
void datavisualizer.HistogramDataRequest.AddTreeFloatDataMemberCode | ( | int | iSpecies, | |
int | iType, | |||
String | sLabel, | |||
int | iCode | |||
) |
If the label matches the one given in the constructor, and the data being histogrammed is a float, this captures the values passed.
iSpecies | Species for this data member | |
iType | Type for this data member | |
sLabel | Data member label. | |
iCode | Data member code. |
Reimplemented from datavisualizer.DataRequest.
ModelInternalFrame datavisualizer.HistogramDataRequest.DrawChart | ( | Legend | oLegend, | |
String | sChartTitle | |||
) | throws ModelException [package, virtual] |
Creates the histogram using data accumulated thus far.
oLegend | Legend for this chart. | |
sChartTitle | Title for this chart. |
datavisualizer.ModelException | Passing through underlying exceptions. |
Implements datavisualizer.DataRequest.
ModelHistogramDataset datavisualizer.HistogramDataRequest.UpdateForVisible | ( | Legend | oLegend | ) | throws ModelException [protected] |
Copies our dataset and includes only species marked as visible in the legend.
oLegend | Legend for this chart. |
ModelException | Passing through an underlying exception. |
void datavisualizer.HistogramDataRequest.UpdateChart | ( | Legend | oLegend | ) | throws ModelException [package, virtual] |
Updates the histogram.
oLegend | Legend for this chart. |
datavisualizer.ModelException | Passing through an underlying exception. |
Implements datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.AddSeriesToDataset | ( | ) | throws ModelException [protected] |
This will add all series to the dataset.
ModelException | Passing through from underlying |
void datavisualizer.HistogramDataRequest.AddTreeIntData | ( | int | iSpecies, | |
int | iType, | |||
int | iCode, | |||
int | iVal | |||
) |
This will add the integer data, if the data for this chart is an int that matches the data member code.
iSpecies | Species for this data. | |
iType | Type for this data. We don't care, other than for matching codes. | |
iCode | Data member code. | |
iVal | Value. |
Reimplemented from datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.AddDeadTreeIntData | ( | int | iSpecies, | |
int | iType, | |||
int | iCode, | |||
int | iDeadCode, | |||
int | iVal | |||
) |
This will add the integer data, if the data for this chart is an int that matches the data member code.
iSpecies | Species for this data. | |
iType | Type for this data. We don't care, other than for matching codes. | |
iCode | Data member code. | |
iVal | Value. |
Reimplemented from datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.AddTreeIntDataMemberCode | ( | int | iSpecies, | |
int | iType, | |||
String | sLabel, | |||
int | iCode | |||
) |
If the label matches the one given in the constructor, and the data being histogrammed is an int, this captures the values passed.
iSpecies | Species for this data member | |
iType | Type for this data member | |
sLabel | Data member label. | |
iCode | Data member code. |
Reimplemented from datavisualizer.DataRequest.
boolean datavisualizer.HistogramDataRequest.WantAnyTreeInts | ( | ) |
If our data piece that's being graphed is an integer, this returns true.
Otherwise, false.
Reimplemented from datavisualizer.DataRequest.
boolean datavisualizer.HistogramDataRequest.WantAnyDeadTreeInts | ( | ) |
If our data piece that's being graphed is an integer, this returns true.
Otherwise, false.
Reimplemented from datavisualizer.DataRequest.
boolean datavisualizer.HistogramDataRequest.WantAnyTreeFloats | ( | ) |
If our data piece that's being graphed is a float, this returns true.
Otherwise, false.
Reimplemented from datavisualizer.DataRequest.
boolean datavisualizer.HistogramDataRequest.WantAnyDeadTreeFloats | ( | ) |
If our data piece that's being graphed is a float, this returns true.
Otherwise, false.
Reimplemented from datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.ClearData | ( | ) | [package, virtual] |
This nulls our dataset and recreates it, and clears all of our data vectors.
Implements datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.AddTreeFloatData | ( | int | iSpecies, | |
int | iType, | |||
int | iCode, | |||
float | fVal | |||
) |
This will add the float data, if the data for this chart is a float that matches the data member code.
iSpecies | Species for this data. | |
iType | Type for this data. We don't care, other than for matching codes. | |
iCode | Data member code. | |
fVal | Value. |
Reimplemented from datavisualizer.DataRequest.
void datavisualizer.HistogramDataRequest.AddDeadTreeFloatData | ( | int | iSpecies, | |
int | iType, | |||
int | iCode, | |||
int | iDeadCode, | |||
float | fVal | |||
) |
Accepts a tree float data member value.
If it matches our code, we'll increment either the count or the total, depending on the chart type.
iSpecies | Species of the tree from which this value came. | |
iType | Type of the tree from which this value came. | |
iCode | Data member code of this value. | |
fVal | Value. |
Reimplemented from datavisualizer.DataRequest.
String datavisualizer.HistogramDataRequest.m_sLabel [private] |
Data member's label, as it appears in the detailed output file.
boolean datavisualizer.HistogramDataRequest.m_bIsFloat [private] |
Whether our data member being graphed is a float.
boolean datavisualizer.HistogramDataRequest.m_bIsInt [private] |
Whether our data member being graphed is an integer.
boolean [] datavisualizer.HistogramDataRequest.mp_bInclude [private] |
Whether to include each tree type.
The dataset that will be graphed.
JTextField datavisualizer.HistogramDataRequest.m_jNumBins = new JTextField("") [private] |
Field displaying the number of bins in the histogram.
JTextField datavisualizer.HistogramDataRequest.m_jBinSize = new JTextField("") [private] |
Field displaying the bin size in the histogram.
int [][] datavisualizer.HistogramDataRequest.mp_iDataMemberCodes [private] |
The data member codes for this data member - one per species / type.
ArrayList<ArrayList<ArrayList<Number> > > datavisualizer.HistogramDataRequest.mp_oData [private] |
The data - kept in an array of vectors - one per species, per type.
float datavisualizer.HistogramDataRequest.m_fPlotAreaInHectares [private] |
Plot area in hectares.
float datavisualizer.HistogramDataRequest.m_fBinSize [private] |
Size of the histogram bins.
int datavisualizer.HistogramDataRequest.m_iNumBins [private] |
Number of bins in the histogram.
int datavisualizer.HistogramDataRequest.m_iDeadCode [private] |
Dead code for trees (including NOTDEAD).
boolean datavisualizer.HistogramDataRequest.m_bUseLogarithmicAxis [private] |
Whether or not to use a logarithmic axis on the Y.
boolean datavisualizer.HistogramDataRequest.m_bRecalcBinsOnUpdate [private] |
Whether or not we have to recalculate the bins on chart update (i.e.
we are charting an unknown data type without defaults)
boolean datavisualizer.HistogramDataRequest.m_bShowTotal = true [private] |
Whether or not to display a total bar in each bin.