SORTIE Java Interface  1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
sortie.gui.GridValueEditor Class Reference

Window for editing grid values in a spreadsheet-like format. More...

Inheritance diagram for sortie.gui.GridValueEditor:
sortie.gui.behaviorsetup.EnhancedTableWindow

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...
 

Detailed Description

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

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
September 14, 2004: Created (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)

Constructor & Destructor Documentation

◆ GridValueEditor()

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.

Parameters
oFrameJDialog Parent window in which to display
oGridGrid Grid object for which to edit values.
oManagerGUIManager object

Member Function Documentation

◆ actionPerformed()

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.

Parameters
eActionEvent object.

◆ createDataMemberPanel()

JPanel sortie.gui.GridValueEditor.createDataMemberPanel ( String  sDataMemberName,
DataMember []  p_oDataMembers,
Object []  p_oHeaderRow,
Object  p_oTableVals[][] 
)
private

Creates a panel for a data member.

Parameters
sDataMemberNameString Name of the data member.
p_oDataMembersArray of all data members for this grid.
p_oHeaderRowObject[] Header row for the member's table.
p_oTableValsObject[][] Table data for the data member.
Returns
JPanel Formatted panel.

◆ getDisplayName()

String sortie.gui.GridValueEditor.getDisplayName ( DataMember []  p_oDataMemberList,
String  sCodeName 
)
protected

Gets the display name of a data member, given its code name.

Parameters
p_oDataMemberListArray of all data members.
sCodeNameString The code name of the data member.
Returns
String The display name of the data member, or the empty string if the display name cannot be found.

◆ getLastTouchedTable()

EnhancedTable sortie.gui.GridValueEditor.getLastTouchedTable ( )
protected

Discovers which EnhancedTable in the parameter editing window has focus.

Returns
EnhancedTable object with focus, or null if none has focus.

◆ saveData()

void sortie.gui.GridValueEditor.saveData ( ) throws ModelException

Saves updated grid values to the grids.

Exceptions
ModelExceptionif the data extracted is invalid.

◆ setLastTouched()

void sortie.gui.GridValueEditor.setLastTouched ( EnhancedTable  oTable)

Sets a table as last touched by the user.

Parameters
oTableTable to be set as last touched.

Implements sortie.gui.behaviorsetup.EnhancedTableWindow.

◆ writeCurrentWindow()

void sortie.gui.GridValueEditor.writeCurrentWindow ( String  sFileName)

Saves the data in the current set of tables as a tab-delimited text file.

Parameters
sFileNameFile name to save to.

Member Data Documentation

◆ m_oGrid

Grid sortie.gui.GridValueEditor.m_oGrid
private

Grid object for which we are editing values.

◆ m_oManager

GUIManager sortie.gui.GridValueEditor.m_oManager
private

Object for getting data from other objects.


The documentation for this class was generated from the following file: