javawrapper::GridSetup Class Reference

Displays grid settings for editing. More...

List of all members.

Public Member Functions

 GridSetup (java.awt.Frame jParent, GUIManager oManager)
 Constructor.
 GridSetup (java.awt.Dialog jParent, GUIManager oManager)
 Constructor.
void actionPerformed (java.awt.event.ActionEvent oEvent)
 Called when the combo box is chosen or the buttons are pushed.

Protected Member Functions

void SaveGrid (Grid oGrid) throws ModelException
 Saves the contents of a grid's map values to a tab-delimited text file.

Private Member Functions

void BuildGUI (GUIManager oManager)
 Constructs the GUI.
void WriteMap (FileWriter oOut, String[][] p_sVals) throws java.io. IOException
 Writes the map file array.

Private Attributes

JComboBox m_jGridListCombo
 The combo box displaying enabled grids.
Grid[] mp_oGridList
 List of grids to display.
float[] mp_fXLengths
 Grid cell X lengths - indexes match mp_oGridList.
float[] mp_fYLengths
 Grid cell Y lengths - indexes match mp_oGridList.
JTextField m_jXCellLengthEdit = new JTextField()
 For editing length of X cells.
JTextField m_jYCellLengthEdit = new JTextField()
 For editing length of Y cells.
JButton m_jClearMapButton = new JButton("Clear grid map")
 Button for clearing current grid map values.
GUIManager m_oManager
String m_sHelpID = "windows.grid_setup_window"
 Help ID string.


Detailed Description

Displays grid settings for editing.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Constructor & Destructor Documentation

javawrapper::GridSetup::GridSetup java.awt.Frame  jParent,
GUIManager  oManager
[inline]
 

Constructor.

Parameters:
jParent Frame in which to display this dialog.
oManager GUIManager object.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

javawrapper::GridSetup::GridSetup java.awt.Dialog  jParent,
GUIManager  oManager
[inline]
 

Constructor.

Parameters:
jParent Frame in which to display this dialog.
oManager GUIManager object.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Function Documentation

void javawrapper::GridSetup::actionPerformed java.awt.event.ActionEvent  oEvent  )  [inline]
 

Called when the combo box is chosen or the buttons are pushed.

Parameters:
oEvent Event which triggered this function.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::GridSetup::BuildGUI GUIManager  oManager  )  [inline, private]
 

Constructs the GUI.

Parameters:
oManager GUIManager object.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::GridSetup::SaveGrid Grid  oGrid  )  throws ModelException [inline, protected]
 

Saves the contents of a grid's map values to a tab-delimited text file.

The user gets a file chooser, and assuming they enter a filename, the file is saved. All values in the grid are saved; maps for different values are written successively.

Parameters:
oGrid Grid for which to write maps.
Exceptions:
ModelException if there is a problem writing the file.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::GridSetup::WriteMap FileWriter  oOut,
String  p_sVals[][]
throws java.io. IOException [inline, private]
 

Writes the map file array.

When writing a grid as a table of values, X = columns and Y = rows. This means that in the array to write, the first index is columns, the second is rows. We want to write it such that the data will end up written so that the bottom left corner will be cell 0,0, equal to southwest. We have to write our columns (first index) from 0 up, but we have to write our rows backwards (down to 0).

Parameters:
oOut File to write to
p_sVals Values to write. The first array index is X cell coordinate, the second is Y.
Exceptions:
java.io.IOException if there is a problem writing the file

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:15:39 2006 for SORTIE Java Interface by  doxygen 1.4.6-NO