Public Member Functions | |
FoliarChemistryLineGraphDataRequest (String sChartName, DetailedOutputFileManager oManager) throws ModelException | |
Constructor. | |
void | AddGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal) |
This accepts float data. | |
boolean | WantAnyGridFloats () |
This wants floats. | |
void | AddGridFloatDataMemberCode (String sGridName, String sLabel, int iCode) |
Accepts a grid float data member code for future reference when passed float data members. | |
void | actionPerformed (java.awt.event.ActionEvent oEvent) |
Performs actions for the controls in the line graph window. | |
Protected Member Functions | |
void | WriteChartDataToFile (FileWriter jOut) throws 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 | |
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 |
This will update the chart only if the user has changed which species are visible or unless the number of timesteps is different. | |
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. | |
DefaultXYDataset | MakeDataset (DetailedOutputLegend oLegend) throws javawrapper.ModelException |
Creates the chart dataset. | |
Private Attributes | |
float[][] | mp_fDatasetValues = null |
The dataset values. | |
DefaultXYDataset | m_oDataset = null |
The dataset with all species - keep this for quicker updating when visible species are changed. | |
int[] | mp_iIndexes |
Translates a data member code to an index for the piece of data being graphed. | |
boolean[] | mp_bWhichSpeciesShown |
A copy of which species are being displayed, so we know if the user changed it. | |
JCheckBox | m_jUseTotals = null |
Checkbox for displaying the total. | |
String | m_sDataMember |
Data member name for the piece of data being graphed. | |
String | m_sDataMemberDisplay |
Data member name for displaying on chart. | |
String[] | mp_sSpeciesNames |
Array of species names for display. | |
String | m_sThisGrid |
Name of the grid from which the data will be collected. | |
float | m_fPlotAreaInHa |
Plot area, in hectares. | |
int | m_iNumSpecies |
The number of species. | |
int | m_iCurrentTimestep = -1 |
The current timestep. | |
int | m_iNumTimesteps = -1 |
The total number of timesteps. |
N, P, etc) for all species. This requires the detailed output file to have data saved from the "Foliar Chemistry" grid.
Copyright: Copyright (c) Charles D. Canham 2008 Company: Institute of Ecosystem Studies
datavisualizer.FoliarChemistryLineGraphDataRequest.FoliarChemistryLineGraphDataRequest | ( | 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.FoliarChemistryLineGraphDataRequest.WriteChartDataToFile | ( | FileWriter | jOut | ) | throws IOException, javawrapper.ModelException [protected] |
Writes the line graph's data to tab-delimited text.
jOut | The file to write to. |
IOException | if there is a problem writing the file. | |
ModelException | passed through from called methods if the dataset doesn't make sense. |
void datavisualizer.FoliarChemistryLineGraphDataRequest.AddGridFloatData | ( | String | sGridName, | |
int | iX, | |||
int | iY, | |||
int | iCode, | |||
float | fVal | |||
) |
This accepts float data.
The index vector is consulted and the values added to the appropriate array 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.FoliarChemistryLineGraphDataRequest.WantAnyGridFloats | ( | ) |
void datavisualizer.FoliarChemistryLineGraphDataRequest.AddGridFloatDataMemberCode | ( | String | sGridName, | |
String | sLabel, | |||
int | iCode | |||
) |
Accepts a grid 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.FoliarChemistryLineGraphDataRequest.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.FoliarChemistryLineGraphDataRequest.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 |
Implements datavisualizer.DataRequest.
void datavisualizer.FoliarChemistryLineGraphDataRequest.UpdateChart | ( | Legend | oLegend | ) | throws javawrapper.ModelException [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.
void datavisualizer.FoliarChemistryLineGraphDataRequest.ClearData | ( | ) | throws ModelException [package, virtual] |
Clears out existing data.
ModelException | Doesn't throw an exception. |
Implements datavisualizer.DataRequest.
DefaultXYDataset datavisualizer.FoliarChemistryLineGraphDataRequest.MakeDataset | ( | DetailedOutputLegend | oLegend | ) | throws javawrapper.ModelException [private] |
Creates the chart dataset.
oLegend | Legend The legend for this chart. |
ModelException | if there is a problem creating the dataset. |
DefaultXYDataset datavisualizer.FoliarChemistryLineGraphDataRequest.AdjustVisibleSpecies | ( | DefaultXYDataset | oDataset, | |
Legend | oLegend | |||
) | throws javawrapper.ModelException [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.FoliarChemistryLineGraphDataRequest.actionPerformed | ( | java.awt.event.ActionEvent | oEvent | ) |
Performs actions for the controls in the line graph window.
oEvent | Event triggered. |
Reimplemented from datavisualizer.DataRequest.
float [][] datavisualizer.FoliarChemistryLineGraphDataRequest.mp_fDatasetValues = null [private] |
The dataset values.
The first index is number of species plus one extra for all the species. The second index is number of timesteps.
DefaultXYDataset datavisualizer.FoliarChemistryLineGraphDataRequest.m_oDataset = null [private] |
The dataset with all species - keep this for quicker updating when visible species are changed.
int [] datavisualizer.FoliarChemistryLineGraphDataRequest.mp_iIndexes [private] |
Translates a data member code to an index for the piece of data being graphed.
boolean [] datavisualizer.FoliarChemistryLineGraphDataRequest.mp_bWhichSpeciesShown [private] |
A copy of which species are being displayed, so we know if the user changed it.
JCheckBox datavisualizer.FoliarChemistryLineGraphDataRequest.m_jUseTotals = null [private] |
Checkbox for displaying the total.
Might be null if not needed.
String datavisualizer.FoliarChemistryLineGraphDataRequest.m_sDataMember [private] |
Data member name for the piece of data being graphed.
Data member name for displaying on chart.
String [] datavisualizer.FoliarChemistryLineGraphDataRequest.mp_sSpeciesNames [private] |
Array of species names for display.
String datavisualizer.FoliarChemistryLineGraphDataRequest.m_sThisGrid [private] |
Name of the grid from which the data will be collected.
Plot area, in hectares.
The number of species.
int datavisualizer.FoliarChemistryLineGraphDataRequest.m_iCurrentTimestep = -1 [private] |
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.
Reimplemented from datavisualizer.DataRequest.
int datavisualizer.FoliarChemistryLineGraphDataRequest.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.