Inheritance diagram for datavisualizer::LineGraphDataRequest:
Public Member Functions | |
LineGraphDataRequest (DetailedOutputFileManager oManager, String sChartName, int iChartType, int iTreeType) | |
Constructor. | |
boolean | WantAnyTreeFloats () |
This wants diameter values for all trees. | |
void | AddTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) |
Accepts a tree float data member code. | |
void | AddTreeFloatData (int iSpecies, int iType, int iCode, float fVal) |
Accepts a tree float data member value. | |
void | actionPerformed (java.awt.event.ActionEvent oEvent) |
Performs actions for the controls in the Histogram window. | |
Static Public Attributes | |
static final int | RELATIVE_BASAL_AREA = 1 |
Chart type is relative basal area. | |
static final int | RELATIVE_DENSITY = 2 |
Chart type is relative density. | |
static final int | ABSOLUTE_BASAL_AREA = 3 |
Chart type is absolute basal area. | |
static final int | ABSOLUTE_DENSITY = 4 |
Chart type is absolute density. | |
static final int | ABSOLUTE_VOLUME = 5 |
Chart type is absolute volume. | |
static final int | RELATIVE_VOLUME = 6 |
Chart type is relative volume. | |
Protected Member Functions | |
void | WriteChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException, javawrapper.ModelException |
Writes the line graph's data to tab-delimited text. | |
DefaultXYDataset | AdjustVisibleSpecies (DefaultXYDataset oDataset, Legend oLegend) throws javawrapper.ModelException |
This will take a dataset and make a copy with only series for species which are supposed to be visible. | |
Package Functions | |
void | UpdateChart (Legend oLegend) throws javawrapper.ModelException |
This will update the chart only if the user has changed which species are visible or unless the number of timesteps is different. | |
ModelInternalFrame | DrawChart (Legend oLegend, String sChartTitle) throws javawrapper.ModelException |
Draws the chart. | |
void | ClearData () throws javawrapper.ModelException |
Does nothing, because the charts don't operate on the detailed output file update protocol. |
It can produce absolute and relative graphs of density, basal area, or volume for saplings, adults, and snags; and absolute and relative graphs of density alone for seedlings.
This chart is different from other charts in that it displays data from all timesteps at once, instead of one timestep at a time. Thus, it tends to ignore normal chart drawing requests and has its own code to force parsing of all timestep files in a detailed output package at once.
Technically, density data could be extracted from any tree data member, since counting up the total is all that is required. I didn't do it that way because I'm a little lazy, and I'll wait for a hue and cry from the users before unnecessarily complicating my code.
Copyright: Copyright (c) Charles D. Canham 2003 Company: Institute of Ecosystem Studies
datavisualizer::LineGraphDataRequest::LineGraphDataRequest | ( | DetailedOutputFileManager | oManager, | |
String | sChartName, | |||
int | iChartType, | |||
int | iTreeType | |||
) | [inline] |
Constructor.
Declares all the arrays.
oManager | Parent detailed output file manager | |
sChartName | Name of the table being drawn. | |
iChartType | Type of graph, absolute or relative / density or basal area. | |
iTreeType | Type of tree for which to draw this chart. |
void datavisualizer::LineGraphDataRequest::WriteChartDataToFile | ( | java.io.FileWriter | jOut | ) | throws java.io. IOException, javawrapper.ModelException [inline, protected, virtual] |
Writes the line graph's data to tab-delimited text.
jOut | java.io.FileWriter The file to write to. |
java.io.IOException | if there is a problem writing the file. | |
ModelException | passed through from called methods if the dataset doesn't make sense. |
Implements datavisualizer::DataRequest.
void datavisualizer::LineGraphDataRequest::UpdateChart | ( | Legend | oLegend | ) | throws javawrapper.ModelException [inline, package, virtual] |
This will update the chart only if the user has changed which species are visible or unless the number of timesteps is different.
oLegend | Legend The legend for this chart. |
ModelException | Won't be thrown. |
Implements datavisualizer::DataRequest.
ModelInternalFrame datavisualizer::LineGraphDataRequest::DrawChart | ( | Legend | oLegend, | |
String | sChartTitle | |||
) | throws javawrapper.ModelException [inline, package, virtual] |
Draws the chart.
oLegend | Legend Legend for this chart. | |
sChartTitle | String Chart name for the window title. |
ModelException | Passed through from other called methods - this method doesn't throw it. |
Implements datavisualizer::DataRequest.
void datavisualizer::LineGraphDataRequest::ClearData | ( | ) | throws javawrapper.ModelException [inline, package, virtual] |
Does nothing, because the charts don't operate on the detailed output file update protocol.
ModelException | Won't throw it. |
Implements datavisualizer::DataRequest.
boolean datavisualizer::LineGraphDataRequest::WantAnyTreeFloats | ( | ) | [inline] |
This wants diameter values for all trees.
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::LineGraphDataRequest::AddTreeFloatDataMemberCode | ( | int | iSpecies, | |
int | iType, | |||
String | sLabel, | |||
int | iCode | |||
) | [inline] |
Accepts a tree float data member code.
We're looking for DBH and diam10.
iSpecies | The species for which this is a data member. | |
iType | The tree type for which this is a data member. | |
sLabel | The label of the data member. | |
iCode | The data member code. |
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::LineGraphDataRequest::AddTreeFloatData | ( | int | iSpecies, | |
int | iType, | |||
int | iCode, | |||
float | fVal | |||
) | [inline] |
Accepts a tree float data member value.
If it matches our code, we'll increment either the density count or the basal area 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.
DefaultXYDataset datavisualizer::LineGraphDataRequest::AdjustVisibleSpecies | ( | DefaultXYDataset | oDataset, | |
Legend | oLegend | |||
) | throws javawrapper.ModelException [inline, protected] |
This will take a dataset and make a copy with only series for species which are supposed to be visible.
oDataset | The dataset. | |
oLegend | The legend which controls which species are visible. |
ModelException | wrapping another exception. |
void datavisualizer::LineGraphDataRequest::actionPerformed | ( | java.awt.event.ActionEvent | oEvent | ) | [inline] |
Performs actions for the controls in the Histogram window.
oEvent | Event triggered. |
Reimplemented from datavisualizer::DataRequest.