SORTIE Java Interface  1
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
sortie.datavisualizer.TreeMapCrownRadDataRequest Class Reference

This class manages the data for, and draws, tree maps. More...

Inheritance diagram for sortie.datavisualizer.TreeMapCrownRadDataRequest:
sortie.datavisualizer.DataRequest

Public Member Functions

 TreeMapCrownRadDataRequest (DetailedOutputFileManager oManager, String sChartName, int iDeadCode) throws ModelException
 Constructor. More...
 
void setMinimumCrownRadius (float f)
 Sets the minimum crown radius value to show on the map. More...
 
float getMinimumCrownRadius ()
 Gets the minimum crown radius value to show on the map. More...
 
boolean wantAnyTreeFloats ()
 
boolean wantAnyDeadTreeFloats ()
 
void getReadyForTimestepParse (int iTimestep, boolean bBatchMode) throws ModelException
 
void timestepParseFinished (boolean bBatchMode) throws ModelException
 
void addTreeFloatData (int iSpecies, int iType, int iCode, float fVal, boolean bBatchMode)
 Accepts a piece of tree float data from the parser. More...
 
void addTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode)
 
void addDeadTreeFloatData (int iSpecies, int iType, int iCode, int iDeadCode, float fVal, boolean bBatchMode)
 Accepts a tree float data member value. More...
 
void updateChart (Legend oLegend) throws ModelException
 Updates the tree map. More...
 
void actionPerformed (java.awt.event.ActionEvent oEvent)
 Performs actions for the controls in the Histogram window. More...
 
void saveChartDataToFile (boolean bJustCurrTS)
 Writes a chart's data to a file. More...
 
- Public Member Functions inherited from sortie.datavisualizer.DataRequest
 DataRequest (String sChartName, DetailedOutputFileManager oManager)
 Constructor. More...
 
void setCurrentTimestep (int iTimestep)
 Sets the current time step. More...
 
void actionPerformed (java.awt.event.ActionEvent oEvent)
 If passed the order to write chart data, does it. More...
 
void extractBatchSetupInfo (ChartInfo oInfo) throws ModelException
 Extracts information needed by the data request from the controls panel displayed to the user. More...
 
boolean isFileWritingExternallyManaged ()
 Gets whether or not file writing is externally managed for this data request or whether it takes care of everything itself. More...
 
void getReadyForTimestepParse (int iTimestep, boolean bBatchMode) throws ModelException
 This will be called for all open data requests just before time step parsing begins. More...
 
void timestepParseFinished (boolean bBatchMode) throws ModelException
 This will be called for all open data requests after time step parsing is completed. More...
 
void outputFileParseFinished (boolean bBatchMode)
 This will be called for all open data requests after output file parsing is completed. More...
 
void saveChartDataToFile (boolean bJustCurrTS)
 Writes a chart's data to a file. More...
 
String getChartName ()
 Get the name of the chart. More...
 
JInternalFrame getChart ()
 Get the chart frame. More...
 
boolean wantAnyTreeFloats ()
 Whether or not this object wants any tree float data members. More...
 
boolean wantAnyTreeInts ()
 Whether or not this object wants any tree int data members. More...
 
boolean wantAnyTreeChars ()
 Whether or not this object wants any tree char data members. More...
 
boolean wantAnyTreeBools ()
 Whether or not this object wants any tree bool data members. More...
 
boolean wantAnyDeadTreeFloats ()
 Whether or not this object wants any dead tree float data members. More...
 
boolean wantAnyDeadTreeInts ()
 Whether or not this object wants any dead tree int data members. More...
 
boolean wantAnyDeadTreeChars ()
 Whether or not this object wants any dead tree char data members. More...
 
boolean wantAnyDeadTreeBools ()
 Whether or not this object wants any dead tree bool data members. More...
 
boolean wantAnyGridFloats ()
 Whether or not this object wants any grid float data members. More...
 
boolean wantAnyGridInts ()
 Whether or not this object wants any grid int data members. More...
 
boolean wantAnyGridChars ()
 Whether or not this object wants any grid char data members. More...
 
boolean wantAnyGridBools ()
 Whether or not this object wants any grid bool data members. More...
 
boolean wantAnyGridPackageFloats ()
 Whether or not this object wants any grid package float data members. More...
 
boolean wantAnyGridPackageInts ()
 Whether or not this object wants any grid package int data members. More...
 
boolean wantAnyGridPackageChars ()
 Whether or not this object wants any grid package char data members. More...
 
boolean wantAnyGridPackageBools ()
 Whether or not this object wants any grid package bool data members. More...
 
void addTreeFloatData (int iSpecies, int iType, int iCode, float fVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree float data from the parser. More...
 
void addTreeIntData (int iSpecies, int iType, int iCode, int iVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree int data from the parser. More...
 
void addTreeCharData (int iSpecies, int iType, int iCode, String sVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree char data from the parser. More...
 
void addTreeBoolData (int iSpecies, int iType, int iCode, boolean bVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree bool data from the parser. More...
 
void addDeadTreeFloatData (int iSpecies, int iType, int iCode, int iDeadCode, float fVal, boolean bBatchMode) throws SAXException
 Accepts a piece of dead tree float data from the parser. More...
 
void addDeadTreeIntData (int iSpecies, int iType, int iCode, int iDeadCode, int iVal, boolean bBatchMode) throws SAXException
 Accepts a piece of dead tree int data from the parser. More...
 
void addDeadTreeCharData (int iSpecies, int iType, int iCode, int iDeadCode, String sVal, boolean bBatchMode) throws SAXException
 Accepts a piece of dead tree char data from the parser. More...
 
void addDeadTreeBoolData (int iSpecies, int iType, int iCode, int iDeadCode, boolean bVal, boolean bBatchMode) throws SAXException
 Accepts a piece of dead tree bool data from the parser. More...
 
void addGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid float data from the parser. More...
 
void addGridIntData (String sGridName, int iX, int iY, int iCode, int iVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid int data from the parser. More...
 
void addGridCharData (String sGridName, int iX, int iY, int iCode, String sVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid char data from the parser. More...
 
void addGridBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid bool data from the parser. More...
 
void addGridPackageFloatData (String sGridName, int iX, int iY, int iCode, float fVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid package float data from the parser. More...
 
void addGridPackageIntData (String sGridName, int iX, int iY, int iCode, int iVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid package int data from the parser. More...
 
void addGridPackageCharData (String sGridName, int iX, int iY, int iCode, String sVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid package char data from the parser. More...
 
void addGridPackageBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal, boolean bBatchMode) throws SAXException
 Accepts a piece of grid package bool data from the parser. More...
 
void endPackage () throws SAXException
 Announces a package has ended. More...
 
void endTree (boolean bBatchMode) throws SAXException
 Announces a tree record has ended. More...
 
void addTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree float data member code for future reference when passed float data members. More...
 
void addTreeIntDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree int data member code for future reference when passed int data members. More...
 
void addTreeCharDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree char data member code for future reference when passed char data members. More...
 
void addTreeBoolDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree bool data member code for future reference when passed bool data members. More...
 
void addGridFloatDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid float data member code for future reference when passed float data members. More...
 
void addGridIntDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid int data member code for future reference when passed int data members. More...
 
void addGridCharDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid char data member code for future reference when passed char data members. More...
 
void addGridBoolDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid bool data member code for future reference when passed bool data members. More...
 
void addGridPackageFloatDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package float data member code for future reference when passed float data members. More...
 
void addGridPackageIntDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package int data member code for future reference when passed int data members. More...
 
void addGridPackageCharDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package char data member code for future reference when passed char data members. More...
 
void addGridPackageBoolDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package bool data member code for future reference when passed bool data members. More...
 

Protected Member Functions

void writeChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException, sortie.data.simpletypes.ModelException
 Writes the tree map's data to tab-delimited text. More...
 
DefaultXYZDataset updateForVisible (Legend oLegend, DefaultXYZDataset oDatasetToAdjust) throws ModelException
 Returns a copy of the dataset with only those species which are marked as visible in the legend. More...
 
void restoreOriginalView ()
 Restores the original view of the tree map with the scale at which it was first displayed. More...
 
void scroll (int iDirection)
 Scrolls the view 10% in the specified direction. More...
 
- Protected Member Functions inherited from sortie.datavisualizer.DataRequest
abstract void writeChartDataToFile (java.io.FileWriter jOut) throws java.io.IOException, ModelException
 Child classes override this to write the data behind their chart to tab-delimited text. More...
 

Private Attributes

ArrayList< ArrayList< XYZDataItem > > mp_oSeries
 A vector of XYZDataItems, one for each species. More...
 
JTextField m_jMinCrownRad = new JTextField("")
 Field displaying the minimum crown radius. More...
 
int [][] mp_iXCode
 Holds the data codes for X. More...
 
float m_fX
 Tree X coordinate. More...
 
int m_iNumSpecies
 Total number of species. More...
 
int m_iDeadCode
 Dead code for trees (including NOTDEAD). More...
 
ChartPanel m_oChartPanel = null
 Chart being displayed. More...
 

Static Private Attributes

static final int LEFT = 1
 Scrolling left. More...
 
static final int RIGHT = 2
 Scrolling right. More...
 
static final int UP = 3
 Scrolling up. More...
 
static final int DOWN = 4
 Scrolling down. More...
 

Additional Inherited Members

- Protected Attributes inherited from sortie.datavisualizer.DataRequest
String m_sBatchFilename = ""
 File name for batch data extraction. More...
 
int m_iCurrentTimestep
 Current time step being parsed. More...
 
boolean m_bShowOneTimestep = true
 Whether this chart shows one timestep at a time (true) or all timesteps (false). More...
 
boolean m_bExternallyManageWriting = true
 Whether or not this data request gets its file writing managed externally. More...
 
ModelInternalFrame m_oChartFrame
 Chart for this request. More...
 
String m_sChartName
 Name string of chart. More...
 

Detailed Description

This class manages the data for, and draws, tree maps.

Seedlings are not drawn. Unlike with the DBH map, crown radius will not be scaled. This means that crown radius geometries can accurately be judged.

X, Y, and Crown Radius are required to draw a tree map.

Copyright: Copyright (c) Charles D. Canham 2009 Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
April 24, 2009: Created (LEM)
June 6, 2011: Added support for dead tree maps (LEM)

Constructor & Destructor Documentation

◆ TreeMapCrownRadDataRequest()

sortie.datavisualizer.TreeMapCrownRadDataRequest.TreeMapCrownRadDataRequest ( DetailedOutputFileManager  oManager,
String  sChartName,
int  iDeadCode 
) throws ModelException

Constructor.

Parameters
oManagerParent detailed output file manager
sChartNameChart name
iDeadCodeDead code for trees (including NOTDEAD).
Exceptions
ModelExceptionPassing through possible underlying exceptions

Member Function Documentation

◆ actionPerformed()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.actionPerformed ( java.awt.event.ActionEvent  oEvent)

Performs actions for the controls in the Histogram window.

Parameters
oEventEvent triggered.

◆ addDeadTreeFloatData()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.addDeadTreeFloatData ( int  iSpecies,
int  iType,
int  iCode,
int  iDeadCode,
float  fVal,
boolean  bBatchMode 
)

Accepts a tree float data member value.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
iDeadCodeDead code for this value.
fValValue.
bBatchModeWhether not this is in the context of the batch utility.

◆ addTreeFloatData()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.addTreeFloatData ( int  iSpecies,
int  iType,
int  iCode,
float  fVal,
boolean  bBatchMode 
)

Accepts a piece of tree float data from the parser.

If this particular piece is not wanted, do nothing.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
fValValue.
bBatchModeWhether not this is in the context of the batch utility.

◆ addTreeFloatDataMemberCode()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.addTreeFloatDataMemberCode ( int  iSpecies,
int  iType,
String  sLabel,
int  iCode 
)

◆ getMinimumCrownRadius()

float sortie.datavisualizer.TreeMapCrownRadDataRequest.getMinimumCrownRadius ( )

Gets the minimum crown radius value to show on the map.

Returns
The minimum crown radius value.

◆ getReadyForTimestepParse()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.getReadyForTimestepParse ( int  iTimestep,
boolean  bBatchMode 
) throws ModelException

◆ restoreOriginalView()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.restoreOriginalView ( )
protected

Restores the original view of the tree map with the scale at which it was first displayed.

◆ saveChartDataToFile()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.saveChartDataToFile ( boolean  bJustCurrTS)

Writes a chart's data to a file.

This can write data for only the current timestep or the whole run.

Parameters
bJustCurrTSIf true, writes for only the current timestep. If false, writes for the whole run.

◆ scroll()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.scroll ( int  iDirection)
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.

Parameters
iDirectionint Direction in which to scroll.

◆ setMinimumCrownRadius()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.setMinimumCrownRadius ( float  f)

Sets the minimum crown radius value to show on the map.

Parameters
fThe new minimum.

◆ timestepParseFinished()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.timestepParseFinished ( boolean  bBatchMode) throws ModelException

◆ updateChart()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.updateChart ( Legend  oLegend) throws ModelException

Updates the tree map.

Parameters
oLegendLegend Legend for this detailed output file.
Exceptions
ModelExceptionif there is a problem drawing the window.

◆ updateForVisible()

DefaultXYZDataset sortie.datavisualizer.TreeMapCrownRadDataRequest.updateForVisible ( Legend  oLegend,
DefaultXYZDataset  oDatasetToAdjust 
) throws ModelException
protected

Returns a copy of the dataset with only those species which are marked as visible in the legend.

Parameters
oLegendThe legend for this chart.
oDatasetToAdjustThe dataset to adjust for visible species.
Returns
The copied dataset.
Exceptions
ModelExceptionPassing through underlying exceptions.

◆ wantAnyDeadTreeFloats()

boolean sortie.datavisualizer.TreeMapCrownRadDataRequest.wantAnyDeadTreeFloats ( )
Returns
True if this is graphing dead trees.

◆ wantAnyTreeFloats()

boolean sortie.datavisualizer.TreeMapCrownRadDataRequest.wantAnyTreeFloats ( )
Returns
True if this is graphing live trees.

◆ writeChartDataToFile()

void sortie.datavisualizer.TreeMapCrownRadDataRequest.writeChartDataToFile ( java.io.FileWriter  jOut) throws java.io. IOException, sortie.data.simpletypes.ModelException
protected

Writes the tree map's data to tab-delimited text.

Parameters
jOutjava.io.FileWriter The file to write to.
Exceptions
IOExceptionif there is a problem writing the file.
ModelExceptionif there's a problem assembling the data.

Member Data Documentation

◆ DOWN

final int sortie.datavisualizer.TreeMapCrownRadDataRequest.DOWN = 4
staticprivate

Scrolling down.

◆ LEFT

final int sortie.datavisualizer.TreeMapCrownRadDataRequest.LEFT = 1
staticprivate

Scrolling left.

◆ m_fX

float sortie.datavisualizer.TreeMapCrownRadDataRequest.m_fX
private

Tree X coordinate.

◆ m_iDeadCode

int sortie.datavisualizer.TreeMapCrownRadDataRequest.m_iDeadCode
private

Dead code for trees (including NOTDEAD).

◆ m_iNumSpecies

int sortie.datavisualizer.TreeMapCrownRadDataRequest.m_iNumSpecies
private

Total number of species.

◆ m_jMinCrownRad

JTextField sortie.datavisualizer.TreeMapCrownRadDataRequest.m_jMinCrownRad = new JTextField("")
private

Field displaying the minimum crown radius.

There will be one of these for each species

◆ m_oChartPanel

ChartPanel sortie.datavisualizer.TreeMapCrownRadDataRequest.m_oChartPanel = null
private

Chart being displayed.

◆ mp_iXCode

int [][] sortie.datavisualizer.TreeMapCrownRadDataRequest.mp_iXCode
private

Holds the data codes for X.

Sized # species by # types.

◆ mp_oSeries

ArrayList<ArrayList<XYZDataItem> > sortie.datavisualizer.TreeMapCrownRadDataRequest.mp_oSeries
private

A vector of XYZDataItems, one for each species.

◆ RIGHT

final int sortie.datavisualizer.TreeMapCrownRadDataRequest.RIGHT = 2
staticprivate

Scrolling right.

◆ UP

final int sortie.datavisualizer.TreeMapCrownRadDataRequest.UP = 3
staticprivate

Scrolling up.


The documentation for this class was generated from the following file: