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

Draws a map for a single grid's data member. More...

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

Public Member Functions

 GridDataRequest (String sChartName, String sGridName, String sDataMemberLabel, DetailedOutputFileManager oManager)
 Constructor. 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...
 
boolean wantAnyGridBools ()
 Whether or not the data member we want is boolean. More...
 
boolean wantAnyGridInts ()
 Whether or not the data member we want is integer. More...
 
boolean wantAnyGridFloats ()
 Whether or not the data member we want is float. More...
 
void addGridFloatDataMemberCode (String sGridName, String sLabel, int iCode)
 Checks to see if our data member's a float. More...
 
void addGridIntDataMemberCode (String sGridName, String sLabel, int iCode)
 Checks to see if our data member's an integer. More...
 
void addGridBoolDataMemberCode (String sGridName, String sLabel, int iCode)
 Checks to see if our data member's a boolean. More...
 
void addGridBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal, boolean bBatchMode)
 Accepts the value of our data member from the parser, if bool. More...
 
void addGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal, boolean bBatchMode)
 Accepts the value of our data member from the parser, if float. More...
 
void addGridIntData (String sGridName, int iX, int iY, int iCode, int iVal, boolean bBatchMode)
 Accepts the value of our data member from the parser, if float. More...
 
void setMinimumDisplayValue (float fValue)
 Sets the minimum display value for the grid. More...
 
void setKneeDisplayValue (float fValue)
 Sets the knee display value for the grid. More...
 
void setMaximumDisplayValue (float fValue)
 Sets the maximum display value for the grid. More...
 
void setMinimumDisplayColor (int iValue)
 Sets the minimum display color for the grid. More...
 
void setKneeDisplayColor (int iValue)
 Sets the knee display color for the grid. More...
 
void setMaximumDisplayColor (int iValue)
 Sets the maximum display color for the grid. More...
 
void setUserSetDisplay (boolean bValue)
 Sets whether or not the user set display values. 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 (FileWriter jOut) throws IOException
 Writes the grid map's data to tab-delimited text. 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 Member Functions

XYCellRenderer getRenderer () throws ModelException
 Creates the XYCellRenderer for this graph. More...
 

Private Attributes

ArrayList< XYZDataItemm_oSeries = new ArrayList<XYZDataItem>(0)
 This holds the actual grid XYZ data. More...
 
float m_fMinDisplayValue
 Minimum value, in case the user sets it. More...
 
int m_iDataCode
 Data member code of the value we're graphing. More...
 
boolean m_bDataIsInt
 Whether or not the data member is an integer. 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

Draws a map for a single grid's data member.

It can graph an integer, a float, or a bool (which converts to an int of 0 or 1). The values are mapped on a grayscale. The minimum (black) value will be 0, or the smallest value if it is less than 0. The maximum (white) value will be found at each timestep, and the knee will be set between the minimum and maximum value.

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
December 8, 2011: Wiped the slate clean for version 7 (LEM)

Constructor & Destructor Documentation

◆ GridDataRequest()

sortie.datavisualizer.GridDataRequest.GridDataRequest ( String  sChartName,
String  sGridName,
String  sDataMemberLabel,
DetailedOutputFileManager  oManager 
)

Constructor.

Parameters
sChartNameName of chart.
sDataMemberLabelLabel of data member to graph.
sGridNameName of the grid that has the data member.
oManagerDetailedOutputFileManager for this file.

Member Function Documentation

◆ addGridBoolData()

void sortie.datavisualizer.GridDataRequest.addGridBoolData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
boolean  bVal,
boolean  bBatchMode 
)

Accepts the value of our data member from the parser, if bool.

Parameters
sGridNameName of the grid for this data
iXX number of the cell from which this value came
iYY number of the cell from which this value came
iCodeData member code of this value.
bValValue.
bBatchModeWhether not this is in the context of the batch utility.

◆ addGridBoolDataMemberCode()

void sortie.datavisualizer.GridDataRequest.addGridBoolDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

Checks to see if our data member's a boolean.

If the label matches, this grabs the code and sets the flags.

Parameters
sGridNameName of the grid
sLabelThe label of the data member.
iCodeThe data member code.

◆ addGridFloatData()

void sortie.datavisualizer.GridDataRequest.addGridFloatData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal,
boolean  bBatchMode 
)

Accepts the value of our data member from the parser, if float.

Parameters
sGridNameName of the grid for this data
iXX number of the cell from which this value came
iYY number of the cell from which this value came
iCodeData member code of this value.
fValValue.
bBatchModeWhether not this is in the context of the batch utility.

◆ addGridFloatDataMemberCode()

void sortie.datavisualizer.GridDataRequest.addGridFloatDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

Checks to see if our data member's a float.

If the label matches, this grabs the code and sets the flags.

Parameters
sGridNameName of the grid
sLabelThe label of the data member.
iCodeThe data member code.

◆ addGridIntData()

void sortie.datavisualizer.GridDataRequest.addGridIntData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
int  iVal,
boolean  bBatchMode 
)

Accepts the value of our data member from the parser, if float.

Parameters
sGridNameName of the grid for this data
iXX number of the cell from which this value came
iYY number of the cell from which this value came
iCodeData member code of this value.
iValValue.
bBatchModeWhether not this is in the context of the batch utility.

◆ addGridIntDataMemberCode()

void sortie.datavisualizer.GridDataRequest.addGridIntDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

Checks to see if our data member's an integer.

If the label matches, this grabs the code and sets the flags.

Parameters
sGridNameName of the grid
sLabelThe label of the data member.
iCodeThe data member code.

◆ getReadyForTimestepParse()

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

This will be called for all open data requests just before time step parsing begins.

Parameters
iTimestepTimestep to parse.
bBatchModeWhether or not this is in the context of batch extraction mode.

◆ getRenderer()

XYCellRenderer sortie.datavisualizer.GridDataRequest.getRenderer ( ) throws ModelException
private

Creates the XYCellRenderer for this graph.

If the user has set grayscale controls, they are passed to the renderer. If not, this sets the defaults according to the dataset. The minimum data value is set to 0 unless there is a smaller value, in which case that becomes the minimum. The maximum data value is set to the highest Z value in the dataset. The knee value is set halfway from the minimum to the maximum. The color values are left alone.

Returns
The set up XYCellRenderer.
Exceptions
sortie.data.simpletypes.ModelExceptionif the color values are rejected.

◆ setKneeDisplayColor()

void sortie.datavisualizer.GridDataRequest.setKneeDisplayColor ( int  iValue)

Sets the knee display color for the grid.

Same as XYCellRenderer's knee color.

Parameters
iValueKnee display color for the grid.

◆ setKneeDisplayValue()

void sortie.datavisualizer.GridDataRequest.setKneeDisplayValue ( float  fValue)

Sets the knee display value for the grid.

Same as XYCellRenderer's knee value.

Parameters
fValueKnee display value for the grid.

◆ setMaximumDisplayColor()

void sortie.datavisualizer.GridDataRequest.setMaximumDisplayColor ( int  iValue)

Sets the maximum display color for the grid.

Same as XYCellRenderer's maximum color.

Parameters
iValueMaximum display color for the grid.

◆ setMaximumDisplayValue()

void sortie.datavisualizer.GridDataRequest.setMaximumDisplayValue ( float  fValue)

Sets the maximum display value for the grid.

Same as XYCellRenderer's maximum value.

Parameters
fValueMaximum display value for the grid.

◆ setMinimumDisplayColor()

void sortie.datavisualizer.GridDataRequest.setMinimumDisplayColor ( int  iValue)

Sets the minimum display color for the grid.

Same as XYCellRenderer's minimum color.

Parameters
iValueMinimum display color for the grid.

◆ setMinimumDisplayValue()

void sortie.datavisualizer.GridDataRequest.setMinimumDisplayValue ( float  fValue)

Sets the minimum display value for the grid.

Same as XYCellRenderer's minimum value.

Parameters
fValueMinimum display value for the grid.

◆ setUserSetDisplay()

void sortie.datavisualizer.GridDataRequest.setUserSetDisplay ( boolean  bValue)

Sets whether or not the user set display values.

Parameters
bValueWhether or not the user set display values.

◆ timestepParseFinished()

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

This will be called for all open data requests after time step parsing is completed.

Parameters
bBatchModeWhether or not this is in the context of batch extraction mode.

◆ wantAnyGridBools()

boolean sortie.datavisualizer.GridDataRequest.wantAnyGridBools ( )

Whether or not the data member we want is boolean.

Returns
True if our data member is boolean, false if not.

◆ wantAnyGridFloats()

boolean sortie.datavisualizer.GridDataRequest.wantAnyGridFloats ( )

Whether or not the data member we want is float.

Returns
True if our data member is float, false if not.

◆ wantAnyGridInts()

boolean sortie.datavisualizer.GridDataRequest.wantAnyGridInts ( )

Whether or not the data member we want is integer.

Returns
True if our data member is integer, false if not.

◆ writeChartDataToFile()

void sortie.datavisualizer.GridDataRequest.writeChartDataToFile ( FileWriter  jOut) throws IOException
protected

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

Parameters
jOutFileWriter The file to write to.
Exceptions
IOExceptionif there's a problem writing the file.

Member Data Documentation

◆ m_bDataIsInt

boolean sortie.datavisualizer.GridDataRequest.m_bDataIsInt
private

Whether or not the data member is an integer.

◆ m_fMinDisplayValue

float sortie.datavisualizer.GridDataRequest.m_fMinDisplayValue
private

Minimum value, in case the user sets it.

◆ m_iDataCode

int sortie.datavisualizer.GridDataRequest.m_iDataCode
private

Data member code of the value we're graphing.

◆ m_oSeries

ArrayList<XYZDataItem> sortie.datavisualizer.GridDataRequest.m_oSeries = new ArrayList<XYZDataItem>(0)
private

This holds the actual grid XYZ data.

X is the X cell number, Y is the Y cell number, Z is the value of the cell to graph.


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