SORTIE Java Interface
1
|
Manages all the data visualization for a single short output file. More...
Public Member Functions | |
void | updateCurrentRunCharts () throws ModelException |
Updates charts for a current run. More... | |
void | updateCharts () throws ModelException |
Redraws all open chart objects, except tables. More... | |
JPopupMenu | getTableOptions (ActionListener sActionListener) |
Gets table options. More... | |
JPopupMenu | getLineGraphOptions (ActionListener sActionListener) |
Gets the line graph options. More... | |
ShortOutputFileManager (DataVisualizerManager oManager, String sFileName) throws ModelException | |
Constructor. More... | |
JPopupMenu | getHistogramOptions (ActionListener actionListener) |
No histogram options for this type of chart. More... | |
JPopupMenu | getMapOptions (ActionListener actionListener) |
No map options for this type of chart. More... | |
Public Member Functions inherited from sortie.datavisualizer.DataFileManager | |
Legend | getLegend () |
Get the legend for this file. More... | |
int | getNumberOpenCharts () |
Gets the number of open charts for this file. More... | |
void | closeAllCharts () |
Closes all the open charts for this window. More... | |
void | cleanUp () throws ModelException |
Any clean-up tasks that must be done can be put here. More... | |
DataFileManager (DataVisualizerManager oManager, String sFileName) | |
Constructor. More... | |
String | getFileName () |
Gets the file being managed. More... | |
abstract JPopupMenu | getLineGraphOptions (ActionListener sActionListener) |
Gets a list of the line graphs this object is capable of drawing. More... | |
abstract JPopupMenu | getMapOptions (ActionListener sActionListener) |
Gets a list of maps this object is capable of drawing. More... | |
abstract JPopupMenu | getHistogramOptions (ActionListener sActionListener) |
Gets a list of histograms this object is capable of drawing. More... | |
abstract JPopupMenu | getTableOptions (ActionListener sActionListener) |
Gets a list of tables this object is capable of drawing. More... | |
JInternalFrame | createNewChart (String sGraphName) throws ModelException |
Creates a requested chart as a JInternalFrame. More... | |
abstract void | updateCharts () throws ModelException |
Prompts the redrawing of all open charts. More... | |
abstract void | updateCurrentRunCharts () throws ModelException |
Prompts the redrawing of open charts for the current run. More... | |
Protected Member Functions | |
JInternalFrame | drawChart (String sGraphName) throws ModelException |
Draws a requested chart. More... | |
void | updateTable (JPanel jTableWindowPanel, int iTimestep, int iSubplot, int iDead) |
Updates a table window with new data. More... | |
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. More... | |
Protected Member Functions inherited from sortie.datavisualizer.DataFileManager | |
abstract JInternalFrame | drawChart (String sGraphName) throws ModelException |
Creates a requested chart as a JInternalFrame. More... | |
Private Member Functions | |
Object [][][] | createTableDataset (int iTimestep, int iSubplot, int iDead) |
Creates the datasets for the overview table. More... | |
JInternalFrame | createTable (int iTimestep, int iSubplot, Legend oLegend, String sChartTitle) throws ModelException |
Creates the table. More... | |
void | parseFile () throws ModelException |
Reads the file data into the internal arrays. More... | |
DefaultXYDataset | createDataset (Float[][] p_fDataToGraph, Float[] p_fTotals) |
Translates data into the CategoryDataset format, which can then be fed to a chart for display. More... | |
Private Attributes | |
ArrayList< ModelDataset > | mp_oDatasets = new ArrayList<ModelDataset>(0) |
Datasets for each chart. More... | |
Float [][][][][] | mp_fRBA |
Relative basal area data. More... | |
Float [][][][][] | mp_fABA |
Absolute basal area data. More... | |
Float [][][][][] | mp_fRDN |
Relative density data. More... | |
Float [][][][][] | mp_fADN |
Absolute density data. More... | |
Float [][][][] | mp_fABT |
Absolute basal area totals. More... | |
Float [][][][] | mp_fADT |
Absolute density totals. More... | |
String [] | mp_sSpeciesNames |
List of species names. More... | |
String [] | mp_sSubplotNames = null |
List of subplot names. More... | |
String | m_sShortFileDisplayName |
Display string of filename - should have the last 40 chars. More... | |
String | m_sLongFileDisplayName |
Display string of filename - should have the last 80 chars. More... | |
int | m_iNumTypes = 4 |
Number of tree types that this object is willing to work with. More... | |
int | m_iNumSubplots = 1 |
Number of subplots in this file. More... | |
int | m_iNumSpecies = 0 |
Number of species in the file. More... | |
int | m_iNumTimesteps = 0 |
Number of timesteps in the file. More... | |
Static Private Attributes | |
static final int | SEEDLING = 0 |
Seedling. More... | |
static final int | SAPLING = 1 |
Sapling. More... | |
static final int | ADULT = 2 |
Adult. More... | |
static final int | SNAG = 3 |
Snag. More... | |
static final int | RELATIVE_BASAL_AREA = 4 |
Relative basal area chart type. More... | |
static final int | RELATIVE_DENSITY = 5 |
Relative density chart type. More... | |
static final int | ABSOLUTE_BASAL_AREA = 6 |
Absolute basal area chart type. More... | |
static final int | ABSOLUTE_DENSITY = 7 |
Absolute density chart type. More... | |
Additional Inherited Members | |
Protected Attributes inherited from sortie.datavisualizer.DataFileManager | |
DataVisualizerManager | m_oManager |
Manager object. More... | |
String | m_sFilename |
File under management. More... | |
ArrayList< JInternalFrame > | mp_oCharts = new ArrayList<JInternalFrame>(0) |
All charts under management. More... | |
Legend | m_oLegend |
The legend for this file. More... | |
String [] | mp_sDeadCodeNames = new String[OutputBehaviors.NUMCODES] |
Text equivalents of dead codes. More... | |
Manages all the data visualization for a single short output file.
Copyright: Copyright (c) Charles D. Canham 2012 Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
December 8, 2011: Wiped the slate clean for version 7 (LEM)
sortie.datavisualizer.ShortOutputFileManager.ShortOutputFileManager | ( | DataVisualizerManager | oManager, |
String | sFileName | ||
) | throws ModelException |
Constructor.
Analyzes the output file for the data it contains.
oManager | Manager managing this object. |
sFileName | Filename to manage. |
ModelException | If file cannot be read. |
|
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. |
|
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. |
|
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. |
|
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. |
iDead | Dead code of table to update. |
|
protected |
Draws a requested chart.
sGraphName | Name of the chart to draw. |
ModelException | if there's a problem drawing the chart. |
JPopupMenu sortie.datavisualizer.ShortOutputFileManager.getHistogramOptions | ( | ActionListener | actionListener | ) |
No histogram options for this type of chart.
JPopupMenu sortie.datavisualizer.ShortOutputFileManager.getLineGraphOptions | ( | ActionListener | sActionListener | ) |
Gets the line graph options.
sActionListener | Action listener that will respond to menu events |
JPopupMenu sortie.datavisualizer.ShortOutputFileManager.getMapOptions | ( | ActionListener | actionListener | ) |
No map options for this type of chart.
JPopupMenu sortie.datavisualizer.ShortOutputFileManager.getTableOptions | ( | ActionListener | sActionListener | ) |
Gets table options.
A summary table can be created from this file type.
sActionListener | Action listener that will respond to menu events |
|
private |
Reads the file data into the internal arrays.
ModelException | if the file cannot be opened or read. |
void sortie.datavisualizer.ShortOutputFileManager.updateCharts | ( | ) | throws ModelException |
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. |
void sortie.datavisualizer.ShortOutputFileManager.updateCurrentRunCharts | ( | ) | throws ModelException |
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. |
|
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. |
iDead | Dead code of panel to update. |
|
staticprivate |
Absolute basal area chart type.
|
staticprivate |
Absolute density chart type.
|
staticprivate |
Adult.
|
private |
Number of species in the file.
|
private |
Number of subplots in this file.
|
private |
Number of timesteps in the file.
|
private |
Number of tree types that this object is willing to work with.
|
private |
Display string of filename - should have the last 80 chars.
|
private |
Display string of filename - should have the last 40 chars.
|
private |
Absolute basal area data.
Array indexes are #1 - dead code, #2 - subplot, #3 - type, #4 - species, and #5 - timestep.
|
private |
Absolute basal area totals.
Array indexes are #1 - dead code, #2 - subplot, #3 - type, and #4 - timestep.
|
private |
Absolute density data.
Array indexes are #1 - dead code, #2 - subplot, #3 - type, #4 - species, and #5 - timestep.
|
private |
Absolute density totals.
Array indexes are #1 - dead code, #2 - subplot, #3 - type, and #4 - timestep.
|
private |
Relative basal area data.
Array indexes are #1 - dead code, #2 - subplot, #3 - type, #4 - species, and #5 - timestep.
|
private |
Relative density data.
Array indexes are #1 - dead code, #2 - subplot, #3 - type, #4 - species, and #5 - timestep.
|
private |
Datasets for each chart.
|
private |
List of species names.
|
private |
List of subplot names.
|
staticprivate |
Relative basal area chart type.
|
staticprivate |
Relative density chart type.
|
staticprivate |
Sapling.
|
staticprivate |
Seedling.
|
staticprivate |
Snag.