javawrapper.GridValueEditor Class Reference

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

Inheritance diagram for javawrapper.GridValueEditor:

javawrapper.EnhancedTableWindow

List of all members.

Public Member Functions

 GridValueEditor (JDialog oFrame, GUIManager oManager, Grid oGrid)
 Constructor.
void SetLastTouched (EnhancedTable oTable)
 Sets a table as last touched by the user.
void actionPerformed (ActionEvent e)
 Responds to button events.
void WriteCurrentWindow (String sFileName)
 Saves the data in the current set of tables as a tab-delimited text file.
void SaveData () throws ModelException
 Saves updated grid values to the grids.

Protected Member Functions

EnhancedTable GetLastTouchedTable ()
 Discovers which EnhancedTable in the parameter editing window has focus.
String GetDisplayName (DataMember[] p_oDataMemberList, String sCodeName)
 Gets the display name of a data member, given its code name.

Package Attributes

Vector< EnhancedTablemp_oAllTables = new Vector<EnhancedTable>(0)
 Vector holding all of the EnhancedTable objects in this window.
String m_sHelpID = "windows.grid_edit_window"
 Help topic ID string.

Static Package Attributes

static final long serialVersionUID = 1

Private Member Functions

JPanel CreateDataMemberPanel (String sDataMemberName, DataMember[] p_oDataMembers, Object[] p_oHeaderRow, Object[][] p_oTableVals)
 Creates a panel for a data member.

Private Attributes

Grid m_oGrid
 Grid object for which we are editing values.
GUIManager m_oManager
 Object for getting data from other objects.


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

javawrapper.GridValueEditor.GridValueEditor ( JDialog  oFrame,
GUIManager  oManager,
Grid  oGrid 
)

Constructor.

Builds the window. The window is composed of several panels, one for each grid data member and package data member.

Parameters:
oFrame JDialog Parent window in which to display
oGrid Grid Grid object for which to edit values.
oManager GUIManager object


Member Function Documentation

void javawrapper.GridValueEditor.SetLastTouched ( EnhancedTable  oTable  ) 

Sets a table as last touched by the user.

Parameters:
oTable Table to be set as last touched.

Implements javawrapper.EnhancedTableWindow.

JPanel javawrapper.GridValueEditor.CreateDataMemberPanel ( String  sDataMemberName,
DataMember[]  p_oDataMembers,
Object[]  p_oHeaderRow,
Object  p_oTableVals[][] 
) [private]

Creates a panel for a data member.

Parameters:
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.
Returns:
JPanel Formatted panel.

void javawrapper.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:
e ActionEvent object.

EnhancedTable javawrapper.GridValueEditor.GetLastTouchedTable (  )  [protected]

Discovers which EnhancedTable in the parameter editing window has focus.

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

void javawrapper.GridValueEditor.WriteCurrentWindow ( String  sFileName  ) 

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

Parameters:
sFileName File name to save to.

void javawrapper.GridValueEditor.SaveData (  )  throws ModelException

Saves updated grid values to the grids.

Exceptions:
ModelException if the data extracted is invalid.

String javawrapper.GridValueEditor.GetDisplayName ( DataMember[]  p_oDataMemberList,
String  sCodeName 
) [protected]

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

Parameters:
p_oDataMemberList Array of all data members.
sCodeName String 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.


Member Data Documentation

final long javawrapper.GridValueEditor.serialVersionUID = 1 [static, package]

Grid object for which we are editing values.

Object for getting data from other objects.

Vector holding all of the EnhancedTable objects in this window.

String javawrapper.GridValueEditor.m_sHelpID = "windows.grid_edit_window" [package]

Help topic ID string.


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

Generated on Wed Oct 28 14:01:20 2009 for SORTIE Java Interface by  doxygen 1.5.6