SORTIE Java Interface
1
|
Window for editing grid values in a spreadsheet-like format. More...
Public Member Functions | |
GridValueEditor (JDialog oFrame, GUIManager oManager, Grid oGrid) throws ModelException | |
Constructor. More... | |
void | setLastTouched (EnhancedTable oTable) |
Sets a table as last touched by the user. More... | |
void | actionPerformed (ActionEvent e) |
Responds to button events. More... | |
void | writeCurrentWindow (String sFileName) |
Saves the data in the current set of tables as a tab-delimited text file. More... | |
void | saveData () throws ModelException |
Saves updated grid values to the grids. More... | |
Protected Member Functions | |
EnhancedTable | getLastTouchedTable () |
Discovers which EnhancedTable in the parameter editing window has focus. More... | |
String | getDisplayName (DataMember[] p_oDataMemberList, String sCodeName) |
Gets the display name of a data member, given its code name. More... | |
Private Member Functions | |
JPanel | createDataMemberPanel (String sDataMemberName, DataMember[] p_oDataMembers, Object[] p_oHeaderRow, Object[][] p_oTableVals) |
Creates a panel for a data member. More... | |
Private Attributes | |
Grid | m_oGrid |
Grid object for which we are editing values. More... | |
GUIManager | m_oManager |
Object for getting data from other objects. More... | |
Window for editing grid values in a spreadsheet-like format.
This uses EnhancedTable for advanced display and editing functions.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
September 14, 2004: Created (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)
sortie.gui.GridValueEditor.GridValueEditor | ( | JDialog | oFrame, |
GUIManager | oManager, | ||
Grid | oGrid | ||
) | throws ModelException |
Constructor.
Builds the window. The window is composed of several panels, one for each grid data member and package data member.
oFrame | JDialog Parent window in which to display |
oGrid | Grid Grid object for which to edit values. |
oManager | GUIManager object |
void sortie.gui.GridValueEditor.actionPerformed | ( | ActionEvent | e | ) |
Responds to button events.
If OK, then the parameter window is constructed and this window is closed. If Cancel, then this window is closed.
e | ActionEvent object. |
|
private |
Creates a panel for a data member.
sDataMemberName | String Name of the data member. |
p_oDataMembers | Array of all data members for this grid. |
p_oHeaderRow | Object[] Header row for the member's table. |
p_oTableVals | Object[][] Table data for the data member. |
|
protected |
Gets the display name of a data member, given its code name.
p_oDataMemberList | Array of all data members. |
sCodeName | String The code name of the data member. |
|
protected |
Discovers which EnhancedTable in the parameter editing window has focus.
void sortie.gui.GridValueEditor.saveData | ( | ) | throws ModelException |
Saves updated grid values to the grids.
ModelException | if the data extracted is invalid. |
void sortie.gui.GridValueEditor.setLastTouched | ( | EnhancedTable | oTable | ) |
Sets a table as last touched by the user.
oTable | Table to be set as last touched. |
Implements sortie.gui.behaviorsetup.EnhancedTableWindow.
void sortie.gui.GridValueEditor.writeCurrentWindow | ( | String | sFileName | ) |
Saves the data in the current set of tables as a tab-delimited text file.
sFileName | File name to save to. |
|
private |
Grid object for which we are editing values.
|
private |
Object for getting data from other objects.