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. | |
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. | |
DefaultCategoryDataset | AdjustVisibleSpecies (DefaultCategoryDataset 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. | |
JInternalFrame | 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. | |
Private Member Functions | |
DefaultCategoryDataset | MakeDataset (DetailedOutputLegend oLegend) throws javawrapper.ModelException |
Creates the chart dataset. | |
Private Attributes | |
DefaultCategoryDataset | m_oDataset = null |
The dataset with all species. | |
Float[][] | mp_fData |
Data array. | |
Float[] | mp_fTotal |
Data totals for absolute chart types. | |
int[] | mp_iDataCode |
Holds the data codes for the data being graphed. | |
boolean[] | mp_bWhichSpeciesShown |
A copy of which species are being displayed, so we know if the user changed it. | |
float | m_fPlotAreaInHectares |
Area of the plot, in hectares. | |
int | m_iCurrentTimestep = -1 |
The current timestep. | |
int | m_iNumTimesteps = -1 |
The total number of timesteps. | |
int | m_iChartType |
The type of chart - absolute or relative / basal area or density. | |
int | m_iTreeType |
Tree type of chart - seedling - snag. |
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
|
Constructor. Declares all the arrays.
Edit history: ------------------ November 15, 2004: Created (LEM) |
|
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.
Edit history: ------------------ November 15, 2004: Created (LEM) March 9, 2005: Added volume (LEM) Reimplemented from datavisualizer::DataRequest. |
|
Accepts a tree float data member code. We're looking for DBH and diam10.
Edit history: ------------------ November 15, 2004: Created (LEM) March 9, 2005: Updated to look for volume (LEM) Reimplemented from datavisualizer::DataRequest. |
|
This will take a dataset and make a copy with only series for species which are supposed to be visible.
Edit history: ------------------ November 15, 2004: Created (LEM) |
|
Does nothing, because the charts don't operate on the detailed output file update protocol.
Edit history: ------------------ November 15, 2004: Created (LEM) Implements datavisualizer::DataRequest. |
|
Draws the chart.
Edit history: ------------------ November 15, 2004: Created (LEM) Implements datavisualizer::DataRequest. |
|
Creates the chart dataset.
|
|
This will update the chart only if the user has changed which species are visible or unless the number of timesteps is different.
Edit history: ------------------ November 15, 2004: Created (LEM) November 18, 2004: Updated for real-time data visualization (LEM) Implements datavisualizer::DataRequest. |
|
This wants diameter values for all trees.
Edit history: ------------------ November 15, 2004: Created (LEM) Reimplemented from datavisualizer::DataRequest. |
|
Writes the line graph's data to tab-delimited text.
Implements datavisualizer::DataRequest. |
|
The current timestep. This helps process an entire detailed output file. It also lets this class know when to ignore offered data - whenever this value is set to -1, some other chart event triggered the parse. |
|
The total number of timesteps. We keep track of this so we know if something has changed (as in real-time data visualization) so we can update appropriately. |
|
Data array. Array indexes are #1 - species, and #2 - timestep. |
|
Data totals for absolute chart types. Array index is number of timestep. |
|
Holds the data codes for the data being graphed. For density for seedlings, this is diam10; for density or basal area, it's DBH; for volume, it's volume. Array index is # of species. |