datavisualizer::WindstormDataRequest Class Reference

Produces a table of windstorm results. More...

Inheritance diagram for datavisualizer::WindstormDataRequest:

datavisualizer::DataRequest List of all members.

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

JInternalFrame 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 m_oTableData = new Vector(0)
 Holds data until it's ready to be displayed.
float[] mp_fDensity
 The density and basal area killed for this storm for each species.
float[] mp_fBasalArea
int[] mp_iDensityIndexes
 Translates a data member code to an index in either the density or basal area arrays.
int[] mp_iBasalAreaIndexes
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.

Detailed Description

Produces a table of windstorm results.

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

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
March 20, 2006: Created (LEM)


Constructor & Destructor Documentation

datavisualizer::WindstormDataRequest::WindstormDataRequest String  sChartName,
DetailedOutputFileManager  oManager
throws ModelException [inline]
 

Constructor.

Parameters:
sChartName Name of the chart
oManager Detailed output file manager
Exceptions:
ModelException not really, but I have to declare this.

Edit history:
------------------
March 20, 2006: Created (LEM)


Member Function Documentation

void datavisualizer::WindstormDataRequest::AddGridPackageFloatData String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal
[inline]
 

This accepts a package float value.

It figures out what it is, then adds it to the appropriate location.

Parameters:
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.

void datavisualizer::WindstormDataRequest::AddGridPackageFloatDataMemberCode String  sGridName,
String  sLabel,
int  iCode
[inline]
 

Accepts a grid package float data member code for future reference when passed float data members.

Parameters:
sGridName Name of the grid
sLabel The label of the data member.
iCode The data member code.

Reimplemented from datavisualizer::DataRequest.

void datavisualizer::WindstormDataRequest::ClearData  )  throws ModelException [inline, package, virtual]
 

Clears out existing data.

Exceptions:
ModelException Doesn't throw an exception.

Edit history:
------------------
March 20, 2006: Created (LEM)

Implements datavisualizer::DataRequest.

JPanel datavisualizer::WindstormDataRequest::CreateTable  )  [inline, protected]
 

Turns the accumulated data into a table for viewing.

Returns:
JPanel The panel containing the table.

JInternalFrame datavisualizer::WindstormDataRequest::DrawChart Legend  oLegend,
String  sChartTitle
throws ModelException [inline, package, virtual]
 

Creates a table of the results that have been collected.

Parameters:
oLegend The species legend.
sChartTitle The chart title.
Returns:
A JInternalFrame with the table present in it.
Exceptions:
datavisualizer.ModelException 
Edit history:
------------------
March 20, 2006: Created (LEM)

Implements datavisualizer::DataRequest.

void datavisualizer::WindstormDataRequest::EndPackage  )  [inline]
 

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.

int datavisualizer::WindstormDataRequest::GetSpeciesFromDataMemberLabel String  sLabel  )  [inline, private]
 

Gets the species from a data member label which ends in "_x", where x is the species number.

Parameters:
sLabel The data member label.
Returns:
The species number, or -1 if none exists.

void datavisualizer::WindstormDataRequest::UpdateChart Legend  oLegend  )  throws ModelException [inline, package, virtual]
 

Redraws the chart using the existing dataset.

Parameters:
oLegend The legend for this chart.
Exceptions:
ModelException if anything goes wrong with the chart drawing.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Implements datavisualizer::DataRequest.

boolean datavisualizer::WindstormDataRequest::WantAnyGridPackageFloats  )  [inline]
 

This wants package floats.

Returns:
True.

Reimplemented from datavisualizer::DataRequest.

void datavisualizer::WindstormDataRequest::WriteChartDataToFile java.io.FileWriter  jOut  )  throws java.io. IOException [inline, protected, virtual]
 

Writes the table's data to tab-delimited text.

Parameters:
jOut java.io.FileWriter The file to write to.
Exceptions:
java.io.IOException if there's a problem writing the file.

Implements datavisualizer::DataRequest.


Member Data Documentation

Vector datavisualizer::WindstormDataRequest::m_oTableData = new Vector(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.

int [] datavisualizer::WindstormDataRequest::mp_iDensityIndexes [private]
 

Translates a data member code to an index in either the density or basal area arrays.

The array index is the species number; the value in the array is the code.


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:15:28 2006 for SORTIE Java Interface by  doxygen 1.4.6-NO