Public Member Functions | |
WindstormDataRequest (String sChartName, DetailedOutputFileManager oManager) throws ModelException | |
Constructor. | |
void | AddGridPackageFloatData (String sGridName, int iX, int iY, int iCode, float fVal) |
This accepts a package float value. | |
boolean | WantAnyGridPackageFloats () |
This wants package floats. | |
void | AddGridPackageFloatDataMemberCode (String sGridName, String sLabel, int iCode) |
Accepts a grid package float data member code for future reference when passed float data members. | |
void | EndPackage () |
Processing to occur after we've received a package. | |
Protected Member Functions | |
void | WriteChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException |
Writes the table's data to tab-delimited text. | |
JPanel | CreateTable () |
Turns the accumulated data into a table for viewing. | |
Package Functions | |
ModelInternalFrame | DrawChart (Legend oLegend, String sChartTitle) throws ModelException |
Creates a table of the results that have been collected. | |
void | UpdateChart (Legend oLegend) throws ModelException |
Redraws the chart using the existing dataset. | |
void | ClearData () throws ModelException |
Clears out existing data. | |
Private Member Functions | |
int | GetSpeciesFromDataMemberLabel (String sLabel) |
Gets the species from a data member label which ends in "_x", where x is the species number. | |
Private Attributes | |
Vector< String[]> | m_oTableData = new Vector<String[]>(0) |
Holds data until it's ready to be displayed. | |
float[] | mp_fDensity |
The density killed for this storm for each species. | |
float[] | mp_fBasalArea |
The basal area killed for this storm for each species. | |
int[] | mp_iDensityIndexes |
Translates a data member code to an index in the density array. | |
int[] | mp_iBasalAreaIndexes |
Translates a data member code to an index in the basal area array. | |
String | m_sThisGrid |
Name of the grid from which the data will be collected. | |
float | m_fStormSeverity |
Severity of the current storm. | |
int | m_iNumSpecies |
The number of species. | |
int | m_iSeverityCode |
Index code for storm severity. | |
int | m_iNumCols = 3 |
Number of columns in the table. |
A windstorm table requires the detailed output file to have data saved from the "Windstorm Results" grid.
Copyright: Copyright (c) Charles D. Canham 2006 Company: Institute of Ecosystem Studies
datavisualizer.WindstormDataRequest.WindstormDataRequest | ( | String | sChartName, | |
DetailedOutputFileManager | oManager | |||
) | throws ModelException |
Constructor.
sChartName | Name of the chart | |
oManager | Detailed output file manager |
ModelException | not really, but I have to declare this. |
void datavisualizer.WindstormDataRequest.WriteChartDataToFile | ( | java.io.FileWriter | jOut | ) | throws java.io. IOException [protected, virtual] |
Writes the table'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.WindstormDataRequest.AddGridPackageFloatData | ( | String | sGridName, | |
int | iX, | |||
int | iY, | |||
int | iCode, | |||
float | fVal | |||
) |
This accepts a package float value.
It figures out what it is, then adds it to the appropriate location.
sGridName | Name of the grid for this data | |
iX | X number of the cell from which this value came | |
iY | Y number of the cell from which this value came | |
iCode | Data member code of this value. | |
fVal | Value. |
Reimplemented from datavisualizer.DataRequest.
boolean datavisualizer.WindstormDataRequest.WantAnyGridPackageFloats | ( | ) |
void datavisualizer.WindstormDataRequest.AddGridPackageFloatDataMemberCode | ( | String | sGridName, | |
String | sLabel, | |||
int | iCode | |||
) |
Accepts a grid package float data member code for future reference when passed float data members.
sGridName | Name of the grid | |
sLabel | The label of the data member. | |
iCode | The data member code. |
Reimplemented from datavisualizer.DataRequest.
int datavisualizer.WindstormDataRequest.GetSpeciesFromDataMemberLabel | ( | String | sLabel | ) | [private] |
Gets the species from a data member label which ends in "_x", where x is the species number.
sLabel | The data member label. |
ModelInternalFrame datavisualizer.WindstormDataRequest.DrawChart | ( | Legend | oLegend, | |
String | sChartTitle | |||
) | throws ModelException [package, virtual] |
Creates a table of the results that have been collected.
oLegend | The species legend. | |
sChartTitle | The chart title. |
datavisualizer.ModelException | Edit history: ------------------ March 20, 2006: Created (LEM) |
Implements datavisualizer.DataRequest.
void datavisualizer.WindstormDataRequest.UpdateChart | ( | Legend | oLegend | ) | throws ModelException [package, virtual] |
Redraws the chart using the existing dataset.
oLegend | The legend for this chart. |
ModelException | if anything goes wrong with the chart drawing. |
Implements datavisualizer.DataRequest.
JPanel datavisualizer.WindstormDataRequest.CreateTable | ( | ) | [protected] |
Turns the accumulated data into a table for viewing.
void datavisualizer.WindstormDataRequest.ClearData | ( | ) | throws ModelException [package, virtual] |
Clears out existing data.
ModelException | Doesn't throw an exception. |
Implements datavisualizer.DataRequest.
void datavisualizer.WindstormDataRequest.EndPackage | ( | ) |
Processing to occur after we've received a package.
This takes the data and formats it into text strings, which it arranges into m_oTableData, ready to display in a table.
Reimplemented from datavisualizer.DataRequest.
Vector<String[]> datavisualizer.WindstormDataRequest.m_oTableData = new Vector<String[]>(0) [private] |
Holds data until it's ready to be displayed.
Since we don't know how many storms we'll have each timestep, this is a vector. Every time we get to the end of a package, the results of that package will be written here. Each vector element is an array of strings with three elements, for the three columns. They may be empty.
float [] datavisualizer.WindstormDataRequest.mp_fDensity [private] |
The density killed for this storm for each species.
float [] datavisualizer.WindstormDataRequest.mp_fBasalArea [private] |
The basal area killed for this storm for each species.
int [] datavisualizer.WindstormDataRequest.mp_iDensityIndexes [private] |
Translates a data member code to an index in the density array.
The array index is the species number; the value in the array is the code.
int [] datavisualizer.WindstormDataRequest.mp_iBasalAreaIndexes [private] |
Translates a data member code to an index in the basal area array.
The array index is the species number; the value in the array is the code.
String datavisualizer.WindstormDataRequest.m_sThisGrid [private] |
Name of the grid from which the data will be collected.
float datavisualizer.WindstormDataRequest.m_fStormSeverity [private] |
Severity of the current storm.
int datavisualizer.WindstormDataRequest.m_iNumSpecies [private] |
The number of species.
int datavisualizer.WindstormDataRequest.m_iSeverityCode [private] |
Index code for storm severity.
int datavisualizer.WindstormDataRequest.m_iNumCols = 3 [private] |
Number of columns in the table.