Public Member Functions | |
void | UpdateCurrentRunCharts () throws ModelException |
Updates charts for a current run. | |
void | UpdateCharts () throws ModelException |
Redraws all open chart objects, except tables. | |
String[] | GetTableOptions () |
Gets table options. | |
String[] | GetHistogramOptions () |
No histogram options for this type of chart. | |
String[] | GetMapOptions () |
No map options for this type of chart. | |
String[] | GetLineGraphOptions () |
Gets the line graph options. | |
ShortOutputFileManager (String sFileName) throws ModelException | |
Constructor. | |
Protected Member Functions | |
JInternalFrame | DrawChart (String sGraphName) throws ModelException |
Draws a requested chart. | |
void | UpdateTable (JPanel jTableWindowPanel, int iTimestep, int iSubplot) |
Updates a table window with new data. | |
DefaultXYDataset | AdjustVisibleSpecies (DefaultXYDataset oDataset, Legend oLegend) throws ModelException |
This will take a dataset and make a copy with only series for species which are supposed to be visible. | |
Private Member Functions | |
Object[][][] | CreateTableDataset (int iTimestep, int iSubplot) |
Creates the datasets for the overview table. | |
JInternalFrame | CreateTable (int iTimestep, int iSubplot, Legend oLegend, String sChartTitle) throws ModelException |
Creates the table. | |
void | ParseFile () throws ModelException |
Reads the file data into the internal arrays. | |
DefaultXYDataset | CreateDataset (Float[][] p_fDataToGraph, Float[] p_fTotals) |
Translates data into the CategoryDataset format, which can then be fed to a chart for display. | |
Private Attributes | |
Vector< ModelDataset > | mp_oDatasets = new Vector<ModelDataset>(0) |
Datasets for each chart. | |
Float[][][][] | mp_fRBA |
Relative basal area data. | |
Float[][][][] | mp_fABA |
Absolute basal area data. | |
Float[][][][] | mp_fRDN |
Relative density data. | |
Float[][][][] | mp_fADN |
Absolute density data. | |
Float[][][] | mp_fABT |
Absolute basal area totals. | |
Float[][][] | mp_fADT |
Absolute density totals. | |
String[] | mp_sSpeciesNames |
List of species names. | |
String[] | mp_sSubplotNames = null |
List of subplot names. | |
String | m_sFileDisplayName |
Display string of filename - should have the last 20 chars. | |
int | m_iNumTypes = 4 |
Number of tree types that this object is willing to work with. | |
int | m_iNumSubplots = 1 |
Number of subplots in this file. | |
int | m_iNumSpecies = 0 |
Number of species in the file. | |
int | m_iNumTimesteps = 0 |
Number of timesteps in the file. | |
Static Private Attributes | |
static final int | SEEDLING = 0 |
Seedling. | |
static final int | SAPLING = 1 |
Sapling. | |
static final int | ADULT = 2 |
Adult. | |
static final int | SNAG = 3 |
Snag. | |
static final int | RELATIVE_BASAL_AREA = 4 |
Relative basal area chart type. | |
static final int | RELATIVE_DENSITY = 5 |
Relative density chart type. | |
static final int | ABSOLUTE_BASAL_AREA = 6 |
Absolute basal area chart type. | |
static final int | ABSOLUTE_DENSITY = 7 |
Absolute density chart type. | |
Classes | |
class | LineGraphFileWriter |
Takes care of writing out a line graph's data. More... | |
class | TableFileWriter |
Writes out table data to file. More... | |
class | TotalUpdater |
Handles it when a "Show Total" checkbox is checked. More... |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
datavisualizer.ShortOutputFileManager.ShortOutputFileManager | ( | String | sFileName | ) | throws ModelException |
Constructor.
Analyzes the output file for the data it contains.
sFileName | Filename to manage. |
ModelException | If file cannot be read. |
JInternalFrame datavisualizer.ShortOutputFileManager.DrawChart | ( | String | sGraphName | ) | throws ModelException [protected, virtual] |
Draws a requested chart.
sGraphName | Name of the chart to draw. |
ModelException | if there's a problem drawing the chart. |
Implements datavisualizer.DataFileManager.
Object [][][] datavisualizer.ShortOutputFileManager.CreateTableDataset | ( | int | iTimestep, | |
int | iSubplot | |||
) | [private] |
Creates the datasets for the overview table.
This creates four table datasets, one each for seedlings, saplings, adults, and snags. All numbers are placed in as formatted strings with a max of 2 decimal places.
iTimestep | Timestep for which to draw the table. | |
iSubplot | Index of subplot, or 0 if it's the whole plot. |
JInternalFrame datavisualizer.ShortOutputFileManager.CreateTable | ( | int | iTimestep, | |
int | iSubplot, | |||
Legend | oLegend, | |||
String | sChartTitle | |||
) | throws ModelException [private] |
Creates the table.
There are four sub-tables, one each for seedlings, saplings, adults, and snags. The tables are arranged in two rows, with adults and saplings in the top row and snags and seedlings in the bottom row.
A pair of buttons is added to advance the table forward and back.
oLegend | Legend for this table. | |
iTimestep | Timestep for which to draw the table. | |
iSubplot | Index of subplot, or 0 if it's the whole plot. | |
sChartTitle | Title to display in the chart window. |
ModelException | If anything goes wrong with the drawing. |
void datavisualizer.ShortOutputFileManager.UpdateTable | ( | JPanel | jTableWindowPanel, | |
int | iTimestep, | |||
int | iSubplot | |||
) | [protected] |
Updates a table window with new data.
jTableWindowPanel | The content pane of the window containing the table to update. | |
iTimestep | The timestep of the data to display. | |
iSubplot | The subplot of the data to display. |
void datavisualizer.ShortOutputFileManager.UpdateCurrentRunCharts | ( | ) | throws ModelException [virtual] |
Updates charts for a current run.
This reparses and redraws the charts from scratch, since they show the cumulative history of a run.
ModelException | if there is a problem reading the file or drawing the charts. |
Implements datavisualizer.DataFileManager.
void datavisualizer.ShortOutputFileManager.UpdateCharts | ( | ) | throws ModelException [virtual] |
Redraws all open chart objects, except tables.
Tables are not affected by any incidence that affects the other charts, such as clicking species on the legend.
ModelException | passing through from other methods. |
Implements datavisualizer.DataFileManager.
String [] datavisualizer.ShortOutputFileManager.GetTableOptions | ( | ) | [virtual] |
Gets table options.
A summary table can be created from this file type.
Implements datavisualizer.DataFileManager.
String [] datavisualizer.ShortOutputFileManager.GetHistogramOptions | ( | ) | [virtual] |
No histogram options for this type of chart.
Implements datavisualizer.DataFileManager.
String [] datavisualizer.ShortOutputFileManager.GetMapOptions | ( | ) | [virtual] |
No map options for this type of chart.
Implements datavisualizer.DataFileManager.
String [] datavisualizer.ShortOutputFileManager.GetLineGraphOptions | ( | ) | [virtual] |
Gets the line graph options.
Implements datavisualizer.DataFileManager.
void datavisualizer.ShortOutputFileManager.ParseFile | ( | ) | throws ModelException [private] |
Reads the file data into the internal arrays.
ModelException | if the file cannot be opened or read. |
DefaultXYDataset datavisualizer.ShortOutputFileManager.CreateDataset | ( | Float | p_fDataToGraph[][], | |
Float[] | p_fTotals | |||
) | [private] |
Translates data into the CategoryDataset format, which can then be fed to a chart for display.
p_fDataToGraph | The data to graph as a 2D Float array, with the first index being number of species and the second number of timesteps. | |
p_fTotals | The totals array, sized number of timesteps, if applicable; if there are no totals, pass null. |
DefaultXYDataset datavisualizer.ShortOutputFileManager.AdjustVisibleSpecies | ( | DefaultXYDataset | oDataset, | |
Legend | oLegend | |||
) | throws 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. |
final int datavisualizer.ShortOutputFileManager.SEEDLING = 0 [static, private] |
Seedling.
final int datavisualizer.ShortOutputFileManager.SAPLING = 1 [static, private] |
Sapling.
final int datavisualizer.ShortOutputFileManager.ADULT = 2 [static, private] |
Adult.
final int datavisualizer.ShortOutputFileManager.SNAG = 3 [static, private] |
Snag.
final int datavisualizer.ShortOutputFileManager.RELATIVE_BASAL_AREA = 4 [static, private] |
Relative basal area chart type.
final int datavisualizer.ShortOutputFileManager.RELATIVE_DENSITY = 5 [static, private] |
Relative density chart type.
final int datavisualizer.ShortOutputFileManager.ABSOLUTE_BASAL_AREA = 6 [static, private] |
Absolute basal area chart type.
final int datavisualizer.ShortOutputFileManager.ABSOLUTE_DENSITY = 7 [static, private] |
Absolute density chart type.
Vector<ModelDataset> datavisualizer.ShortOutputFileManager.mp_oDatasets = new Vector<ModelDataset>(0) [private] |
Datasets for each chart.
Float [][][][] datavisualizer.ShortOutputFileManager.mp_fRBA [private] |
Relative basal area data.
Array indexes are #1 - subplot, #2 - type, #3 - species, and #4 - timestep.
Float [][][][] datavisualizer.ShortOutputFileManager.mp_fABA [private] |
Absolute basal area data.
Array indexes are #1 - subplot, #2 - type, #3 - species, and #4 - timestep.
Float [][][][] datavisualizer.ShortOutputFileManager.mp_fRDN [private] |
Relative density data.
Array indexes are #1 - subplot, #2 - type, #3 - species, and #4 - timestep.
Float [][][][] datavisualizer.ShortOutputFileManager.mp_fADN [private] |
Absolute density data.
Array indexes are #1 - subplot, #2 - type, #3 - species, and #4 - timestep.
Float [][][] datavisualizer.ShortOutputFileManager.mp_fABT [private] |
Absolute basal area totals.
Array indexes are #1 - subplot, #2 - type, and #3 - timestep.
Float [][][] datavisualizer.ShortOutputFileManager.mp_fADT [private] |
Absolute density totals.
Array indexes are #1 - subplot, #2 - type, and #3 - timestep.
String [] datavisualizer.ShortOutputFileManager.mp_sSpeciesNames [private] |
List of species names.
String [] datavisualizer.ShortOutputFileManager.mp_sSubplotNames = null [private] |
List of subplot names.
String datavisualizer.ShortOutputFileManager.m_sFileDisplayName [private] |
Display string of filename - should have the last 20 chars.
int datavisualizer.ShortOutputFileManager.m_iNumTypes = 4 [private] |
Number of tree types that this object is willing to work with.
int datavisualizer.ShortOutputFileManager.m_iNumSubplots = 1 [private] |
Number of subplots in this file.
int datavisualizer.ShortOutputFileManager.m_iNumSpecies = 0 [private] |
Number of species in the file.
int datavisualizer.ShortOutputFileManager.m_iNumTimesteps = 0 [private] |
Number of timesteps in the file.