SORTIE Java Interface
1
|
Displays grid settings for editing. More...
Public Member Functions | |
GridSetup (Frame jParent, GUIManager oManager) | |
Constructor. More... | |
GridSetup (Dialog jParent, GUIManager oManager) | |
Constructor. More... | |
void | actionPerformed (ActionEvent oEvent) |
Called when the combo box is chosen or the buttons are pushed. More... | |
Protected Member Functions | |
void | saveGrid (Grid oGrid) throws ModelException |
Saves the contents of a grid's map values to a tab-delimited text file. More... | |
Private Member Functions | |
void | buildGUI (GUIManager oManager) |
Constructs the GUI. More... | |
void | writeMap (FileWriter oOut, String[][] p_sVals) throws IOException |
Writes the map file array. More... | |
Private Attributes | |
SORTIEComboBox< String > | m_jGridListCombo |
The combo box displaying enabled grids. More... | |
Grid [] | mp_oGridList |
List of grids to display. More... | |
float [] | mp_fXLengths |
Grid cell X lengths - indexes match mp_oGridList. More... | |
JTextField | m_jXCellLengthEdit = new JTextField() |
For editing length of X cells. More... | |
JButton | m_jClearMapButton = new JButton("Clear grid map") |
Button for clearing current grid map values. More... | |
GUIManager | m_oManager |
GUIManager object. More... | |
String | m_sHelpID = "windows.grid_setup_window" |
Help ID string. More... | |
Displays grid settings for editing.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
August 8, 2006: Made it so that there would be no duplicate grids (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)
sortie.gui.GridSetup.GridSetup | ( | Frame | jParent, |
GUIManager | oManager | ||
) |
Constructor.
jParent | Frame in which to display this dialog. |
oManager | GUIManager object. |
sortie.gui.GridSetup.GridSetup | ( | Dialog | jParent, |
GUIManager | oManager | ||
) |
Constructor.
jParent | Frame in which to display this dialog. |
oManager | GUIManager object. |
void sortie.gui.GridSetup.actionPerformed | ( | ActionEvent | oEvent | ) |
Called when the combo box is chosen or the buttons are pushed.
oEvent | Event which triggered this function. |
|
private |
Constructs the GUI.
oManager | GUIManager object. |
|
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.
oGrid | Grid for which to write maps. |
ModelException | if there is a problem writing the file. |
|
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).
oOut | File to write to |
p_sVals | Values to write. The first array index is X cell coordinate, the second is Y. |
java.io.IOException | if there is a problem writing the file |
|
private |
Button for clearing current grid map values.
|
private |
The combo box displaying enabled grids.
|
private |
For editing length of X cells.
|
private |
GUIManager object.
|
private |
Help ID string.
|
private |
Grid cell X lengths - indexes match mp_oGridList.
|
private |
List of grids to display.