Public Member Functions | |
StormDataRequest (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. | |
Protected Member Functions | |
void | WriteChartDataToFile (java.io.FileWriter jOut) throws java.io.IOException |
Writes the table's data to tab-delimited text. | |
JPanel | CreateTable (DetailedOutputLegend oLegend) |
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 javawrapper.ModelException |
Does nothing unless the number of timesteps is different, in which case the table is recreated. | |
void | ClearData () throws javawrapper.ModelException |
Does nothing, because this table doesn't operate on the detailed output file timescale. | |
Private Attributes | |
String[][] | mp_sTable |
The data that will be appearing in the table - this allows us to have a copy saved for file saving etc. | |
Vector< Vector< Vector< Float > > > | mp_oData |
Place for storing storm data as it comes in, number of X cells by number of Y cells. | |
String[] | mp_sColHeaders |
String | m_sThisGrid |
Name of the grid from which the data will be collected. | |
int | m_iNumTimesteps = -1 |
The total number of timesteps. | |
int | m_i1DmgIndexCode |
Code for "1dmg_index" package float data member. |
A storm table requires the detailed output file to have package data saved from the "Storm Results" grid. The table has four columns: timestep, num storms, avg severity of most severe storm, avg severity of least severe storm.
This does all timesteps at once.
Copyright: Copyright (c) Charles D. Canham 2007 Company: Institute of Ecosystem Studies
datavisualizer.StormDataRequest.StormDataRequest | ( | 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.StormDataRequest.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.StormDataRequest.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.StormDataRequest.WantAnyGridPackageFloats | ( | ) |
void datavisualizer.StormDataRequest.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.
ModelInternalFrame datavisualizer.StormDataRequest.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.StormDataRequest.UpdateChart | ( | Legend | oLegend | ) | throws javawrapper.ModelException [package, virtual] |
Does nothing unless the number of timesteps is different, in which case the table is recreated.
This chart does not respond to regular chart update events, since it already shows data for all timesteps.
oLegend | Legend The legend for this chart. |
ModelException | Won't be thrown. |
Implements datavisualizer.DataRequest.
JPanel datavisualizer.StormDataRequest.CreateTable | ( | DetailedOutputLegend | oLegend | ) | [protected] |
Turns the accumulated data into a table for viewing.
void datavisualizer.StormDataRequest.ClearData | ( | ) | throws javawrapper.ModelException [package, virtual] |
Does nothing, because this table doesn't operate on the detailed output file timescale.
ModelException | Won't throw it. |
Implements datavisualizer.DataRequest.
String [][] datavisualizer.StormDataRequest.mp_sTable [private] |
The data that will be appearing in the table - this allows us to have a copy saved for file saving etc.
Vector<Vector<Vector<Float> > > datavisualizer.StormDataRequest.mp_oData [private] |
Place for storing storm data as it comes in, number of X cells by number of Y cells.
String [] datavisualizer.StormDataRequest.mp_sColHeaders [private] |
Initial value:
{"Timestep", "Num storms", "Mean of most severe", "Mean of least severe"}
String datavisualizer.StormDataRequest.m_sThisGrid [private] |
Name of the grid from which the data will be collected.
int datavisualizer.StormDataRequest.m_iNumTimesteps = -1 [private] |
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.
int datavisualizer.StormDataRequest.m_i1DmgIndexCode [private] |
Code for "1dmg_index" package float data member.