Inheritance diagram for datavisualizer::TreeMapDataRequest:
Public Member Functions | |
TreeMapDataRequest (DetailedOutputFileManager oManager, String sChartName) throws ModelException | |
Constructor. | |
void | SetMinimumDbh (float f) |
Sets the minimum dbh value to show on the map. | |
float | GetMinimumDbh () |
Gets the minimum dbh value to show on the map. | |
boolean | WantAnyTreeFloats () |
Whether or not this object wants any tree float data members. | |
void | AddTreeFloatData (int iSpecies, int iType, int iCode, float fVal) |
Accepts a piece of tree float data from the parser. | |
void | AddTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) |
Accepts a tree float data member code for future reference when passed float data members. | |
void | UpdateChart (Legend oLegend) throws ModelException |
Updates the tree map. | |
void | actionPerformed (java.awt.event.ActionEvent oEvent) |
Performs actions for the controls in the Histogram window. | |
void | SaveChartDataToFile (boolean bJustCurrTS) |
Writes a chart's data to a file. | |
Protected Member Functions | |
void | WriteChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException, javawrapper.ModelException |
Writes the tree map's data to tab-delimited text. | |
XYZSeriesCollection | UpdateForVisible (Legend oLegend) throws ModelException |
Returns a copy of the dataset with only those species which are marked as visible in the legend. | |
void | RestoreOriginalView () |
Restores the original view of the tree map with the scale at which it was first displayed. | |
void | Scroll (int iDirection) |
Scrolls the view 10% in the specified direction. | |
Package Functions | |
void | ClearData () throws ModelException |
Clears out data for garbage collection in preparation for new data being read in. | |
ModelInternalFrame | DrawChart (Legend oLegend, String sChartTitle) throws ModelException |
Creates the tree map window. | |
Private Attributes | |
XYZSeriesCollection | m_oDataSet |
These hold the XYZ data (Z being dbh). | |
XYZSeries[] | mp_oSeries |
One for each species. | |
JTextField | m_jDBHScale = new JTextField("") |
Field displaying the DBH scale factor. | |
JTextField | m_jMinDbh = new JTextField("") |
Field displaying the minimum DBH There will be one of these for each species. | |
int[][] | mp_iXCode |
Holds the data codes for X. | |
int[][] | mp_iYCode |
Holds the data codes for Y. | |
int[][] | mp_iDbhCode |
Holds the data codes for DBH. | |
float | m_fX |
Tree X coordinate. | |
float | m_fY |
Tree Y coordinate. | |
float | m_fDbh |
Tree DBH value. | |
float | m_fMinDbh |
Minimum dbh to draw. | |
float | m_fDBHScale = (float) 0.25 |
DBH scale factor. | |
int | m_iNumSpecies |
Total number of species. | |
int | m_iNumTypes |
Total number of tree types. | |
ChartPanel | m_oChartPanel = null |
Chart being displayed. | |
Static Private Attributes | |
static final int | LEFT = 1 |
Scrolling left. | |
static final int | RIGHT = 2 |
Scrolling right. | |
static final int | UP = 3 |
Scrolling up. | |
static final int | DOWN = 4 |
Scrolling down. |
It will draw the trees as circles proportional to the dbh. Seedlings are not drawn.
X, Y, and DBH are required to draw a tree map. While it would be possible to draw a tree map without any kind of DBH or with height instead (back-calculating the dbh), this has not been implemented.
Copyright: Copyright (c) Charles D. Canham 2003 Company: Institute of Ecosystem Studies
datavisualizer::TreeMapDataRequest::TreeMapDataRequest | ( | DetailedOutputFileManager | oManager, | |
String | sChartName | |||
) | throws ModelException [inline] |
Constructor.
oManager | Parent detailed output file manager | |
sChartName | Chart name |
ModelException | Passing through possible underlying exceptions |
void datavisualizer::TreeMapDataRequest::actionPerformed | ( | java.awt.event.ActionEvent | oEvent | ) | [inline] |
Performs actions for the controls in the Histogram window.
oEvent | Event triggered. |
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::TreeMapDataRequest::AddTreeFloatData | ( | int | iSpecies, | |
int | iType, | |||
int | iCode, | |||
float | fVal | |||
) | [inline] |
Accepts a piece of tree float data from the parser.
If this particular piece is not wanted, do nothing.
iSpecies | Species of the tree from which this value came. | |
iType | Type of the tree from which this value came. | |
iCode | Data member code of this value. | |
fVal | Value. |
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::TreeMapDataRequest::AddTreeFloatDataMemberCode | ( | int | iSpecies, | |
int | iType, | |||
String | sLabel, | |||
int | iCode | |||
) | [inline] |
Accepts a tree float data member code for future reference when passed float data members.
iSpecies | The species for which this is a data member. | |
iType | The tree type for which this is a data member. | |
sLabel | The label of the data member. | |
iCode | The data member code. |
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::TreeMapDataRequest::ClearData | ( | ) | throws ModelException [inline, package, virtual] |
Clears out data for garbage collection in preparation for new data being read in.
ModelException | if there are problems. |
Implements datavisualizer::DataRequest.
ModelInternalFrame datavisualizer::TreeMapDataRequest::DrawChart | ( | Legend | oLegend, | |
String | sChartTitle | |||
) | throws ModelException [inline, package, virtual] |
Creates the tree map window.
ModelException | if there is a problem drawing the window. |
Implements datavisualizer::DataRequest.
float datavisualizer::TreeMapDataRequest::GetMinimumDbh | ( | ) | [inline] |
Gets the minimum dbh value to show on the map.
void datavisualizer::TreeMapDataRequest::SaveChartDataToFile | ( | boolean | bJustCurrTS | ) | [inline] |
Writes a chart's data to a file.
This can write data for only the current timestep or the whole run.
bJustCurrTS | If true, writes for only the current timestep. If false, writes for the whole run. |
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::TreeMapDataRequest::Scroll | ( | int | iDirection | ) | [inline, protected] |
Scrolls the view 10% in the specified direction.
If the view is full-size nothing happens. If the view is already scrolled all the way over in the specified direction nothing happens.
iDirection | int Direction in which to scroll. |
void datavisualizer::TreeMapDataRequest::SetMinimumDbh | ( | float | f | ) | [inline] |
Sets the minimum dbh value to show on the map.
f | The new minimum. |
void datavisualizer::TreeMapDataRequest::UpdateChart | ( | Legend | oLegend | ) | throws ModelException [inline, virtual] |
Updates the tree map.
ModelException | if there is a problem drawing the window. |
Implements datavisualizer::DataRequest.
XYZSeriesCollection datavisualizer::TreeMapDataRequest::UpdateForVisible | ( | Legend | oLegend | ) | throws ModelException [inline, protected] |
Returns a copy of the dataset with only those species which are marked as visible in the legend.
oLegend | The legend for this chart. |
ModelException | Passing through underlying exceptions. |
boolean datavisualizer::TreeMapDataRequest::WantAnyTreeFloats | ( | ) | [inline] |
Whether or not this object wants any tree float data members.
Reimplemented from datavisualizer::DataRequest.
void datavisualizer::TreeMapDataRequest::WriteChartDataToFile | ( | java.io.FileWriter | jOut | ) | throws java.io. IOException, javawrapper.ModelException [inline, protected, virtual] |
Writes the tree map's data to tab-delimited text.
jOut | java.io.FileWriter The file to write to. |
IOException | if there is a problem writing the file. | |
ModelException | if there's a problem assembling the data. |
Implements datavisualizer::DataRequest.
int [][] datavisualizer::TreeMapDataRequest::mp_iDbhCode [private] |
Holds the data codes for DBH.
Sized # species by # types.
int [][] datavisualizer::TreeMapDataRequest::mp_iXCode [private] |
Holds the data codes for X.
Sized # species by # types.
int [][] datavisualizer::TreeMapDataRequest::mp_iYCode [private] |
Holds the data codes for Y.
Sized # species by # types.