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. |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
|
Constructor.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Constructor.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Called when the combo box is chosen or the buttons are pushed.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Constructs the GUI.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
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.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
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).
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |