Inherits javax::swing::JDialog.
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. | |
Static Package Attributes | |
static final long | serialVersionUID = 1 |
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 | |
SORTIEComboBox | 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 |
GUIManager object. | |
String | m_sHelpID = "windows.grid_setup_window" |
Help ID string. |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
javawrapper.GridSetup.GridSetup | ( | java.awt.Frame | jParent, | |
GUIManager | oManager | |||
) |
Constructor.
jParent | Frame in which to display this dialog. | |
oManager | GUIManager object. |
javawrapper.GridSetup.GridSetup | ( | java.awt.Dialog | jParent, | |
GUIManager | oManager | |||
) |
Constructor.
jParent | Frame in which to display this dialog. | |
oManager | GUIManager object. |
void javawrapper.GridSetup.BuildGUI | ( | GUIManager | oManager | ) | [private] |
Constructs the GUI.
oManager | GUIManager object. |
void javawrapper.GridSetup.actionPerformed | ( | java.awt.event.ActionEvent | oEvent | ) |
Called when the combo box is chosen or the buttons are pushed.
oEvent | Event which triggered this function. |
void javawrapper.GridSetup.SaveGrid | ( | Grid | oGrid | ) | throws ModelException [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. |
void javawrapper.GridSetup.WriteMap | ( | FileWriter | oOut, | |
String | p_sVals[][] | |||
) | throws java.io. IOException [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 |
final long javawrapper.GridSetup.serialVersionUID = 1 [static, package] |
The combo box displaying enabled grids.
Grid [] javawrapper.GridSetup.mp_oGridList [private] |
List of grids to display.
float [] javawrapper.GridSetup.mp_fXLengths [private] |
Grid cell X lengths - indexes match mp_oGridList.
float [] javawrapper.GridSetup.mp_fYLengths [private] |
Grid cell Y lengths - indexes match mp_oGridList.
JTextField javawrapper.GridSetup.m_jXCellLengthEdit = new JTextField() [private] |
For editing length of X cells.
JTextField javawrapper.GridSetup.m_jYCellLengthEdit = new JTextField() [private] |
For editing length of Y cells.
JButton javawrapper.GridSetup.m_jClearMapButton = new JButton("Clear grid map") [private] |
Button for clearing current grid map values.
GUIManager javawrapper.GridSetup.m_oManager [private] |
GUIManager object.
String javawrapper.GridSetup.m_sHelpID = "windows.grid_setup_window" [private] |
Help ID string.