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

This is a window allowing setup of the Harvest Interface behavior. More...

Inheritance diagram for sortie.gui.behaviorsetup.HarvestInterfaceSetup:

Classes

class  FileColumnsChooser
 Dialog for choosing new file columns. More...
 

Public Member Functions

 HarvestInterfaceSetup (JFrame oParent, HarvestInterface oBeh) throws ModelException
 Constructor. More...
 
void actionPerformed (ActionEvent e)
 Controls actions for this window. More...
 

Protected Member Functions

void loadData () throws ModelException
 Extracts data from the harvest interface behavior, making it ready for display. More...
 
void removeColumn () throws ModelException
 Removes file columns from the list to add. More...
 
void columnUp () throws ModelException
 Moves a selected column up one position in the list. More...
 
void columnDown () throws ModelException
 Moves a selected column down one position in the list. More...
 
void addDataMember () throws ModelException
 Adds a new data member, to be owned by this behavior. More...
 
void removeDataMember () throws ModelException
 Removes a new data member. More...
 
boolean ok () throws ModelException
 What happens when the OK button is clicked. More...
 

Protected Attributes

HarvestInterface m_oBehavior
 HarvestInterface object. More...
 
JTextField m_jExecutablePathEdit = new JTextField()
 Field for capturing the executable's path and filename. More...
 
JTextField m_jSORTIEOutFileEdit = new JTextField()
 Field for capturing the filename that SORTIE is to write. More...
 
JTextField m_jExecutableHarvestOutFileEdit = new JTextField()
 Field for capturing the executable's harvest reply file. More...
 
JTextField m_jExecutableUpdateOutFileEdit = new JTextField()
 Field for capturing the executable's update reply file. More...
 
JTextField m_jBatchParamsFileEdit = new JTextField()
 Field for capturing the batch parameters file. More...
 
JTextField m_jBatchSingleRunParamsFileEdit = new JTextField()
 Field for capturing the file for a single run of batch parameters. More...
 
JTextField m_jNewTreeDataMemberEdit = new JTextField()
 Field for entering new tree data members. More...
 
JTextField m_jExecutableArgs = new JTextField()
 Field for capturing argument strings to pass to the executable. More...
 
JTextField m_jHarvestPeriod = new JTextField()
 Field for capturing the harvest period. More...
 
JList< String > m_jNewTreeDataMembersList
 The list displaying the new tree data members for this behavior. More...
 
JList< String > m_jFileColumnsList
 The list displaying the file columns. More...
 
DefaultListModel< String > m_jNewTreeDataMembersListModel = new DefaultListModel<String>()
 The new tree data members for this behavior. More...
 
DefaultListModel< String > m_jFileColumnsListModel = new DefaultListModel<String>()
 The file columns for the harvest files. More...
 
ArrayList< String > mp_sAllExistingDataMembers = new ArrayList<String>(0)
 List of existing data members, so we can make sure any added have unique names. More...
 

Private Member Functions

void createGUI ()
 Creates the window. More...
 
void browse (JTextField jText)
 Takes care of browsing. More...
 

Private Attributes

String m_sHelpID = "windows.edit_harvest_interface_window"
 The ID of the help file for this window. More...
 

Detailed Description

This is a window allowing setup of the Harvest Interface behavior.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0
Edit history:
----------------—
December 8, 2011: Wiped the slate clean for version 7 (LEM)
July 12, 2013: This is now called from the behavior, so cleaned up some code that allowed for the possibility that the behavior didn't exist (can no longer be true) (LEM)

Constructor & Destructor Documentation

◆ HarvestInterfaceSetup()

sortie.gui.behaviorsetup.HarvestInterfaceSetup.HarvestInterfaceSetup ( JFrame  oParent,
HarvestInterface  oBeh 
) throws ModelException

Constructor.

Parameters
oParentJFrame Parent frame
oBehHarvestInterface object to set up for.
Exceptions
ModelExceptionPassing through from called functions.

Member Function Documentation

◆ actionPerformed()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.actionPerformed ( ActionEvent  e)

Controls actions for this window.

Parameters
eActionEvent.

◆ addDataMember()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.addDataMember ( ) throws ModelException
protected

Adds a new data member, to be owned by this behavior.

Exceptions
ModelExceptionif:
  • The data member is longer than 9 characters
  • It has the same name as an existing data member
  • It has parentheses in the name

◆ browse()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.browse ( JTextField  jText)
private

Takes care of browsing.

Parameters
jTextJTextField The file field to browse for

◆ columnDown()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.columnDown ( ) throws ModelException
protected

Moves a selected column down one position in the list.

Exceptions
ModelExceptionif the request is to move a default column.

◆ columnUp()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.columnUp ( ) throws ModelException
protected

Moves a selected column up one position in the list.

Exceptions
ModelExceptionif the user has tried to disturb the default columns.

◆ createGUI()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.createGUI ( )
private

Creates the window.

◆ loadData()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.loadData ( ) throws ModelException
protected

Extracts data from the harvest interface behavior, making it ready for display.

Exceptions
ModelExceptionPassing through from other called functions.

◆ ok()

boolean sortie.gui.behaviorsetup.HarvestInterfaceSetup.ok ( ) throws ModelException
protected

What happens when the OK button is clicked.

The data is validated and passed to the DisturbanceBehaviors object as needed.

Returns
true if everything is correct; false if the process has been interrupted and the window should not close.
Exceptions
ModelExceptionif:
  • The path is missing to the executable, the harvest out file, or the harvest in file
  • A warning is issued if there is an update file listed but no new tree data members
  • The harvest period is not specified, is not a number, or is negative
  • Either the batch parameters file or the single run batch parameters file is present without the other
  • The batch parameters file is specified but does not exist

◆ removeColumn()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.removeColumn ( ) throws ModelException
protected

Removes file columns from the list to add.

Exceptions
ModelExceptionif a column is not selected, or if the user tries to remove a default column from the list.

◆ removeDataMember()

void sortie.gui.behaviorsetup.HarvestInterfaceSetup.removeDataMember ( ) throws ModelException
protected

Removes a new data member.

Exceptions
ModelExceptionif there is not a data member selected.

Member Data Documentation

◆ m_jBatchParamsFileEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jBatchParamsFileEdit = new JTextField()
protected

Field for capturing the batch parameters file.

◆ m_jBatchSingleRunParamsFileEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jBatchSingleRunParamsFileEdit = new JTextField()
protected

Field for capturing the file for a single run of batch parameters.

◆ m_jExecutableArgs

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jExecutableArgs = new JTextField()
protected

Field for capturing argument strings to pass to the executable.

◆ m_jExecutableHarvestOutFileEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jExecutableHarvestOutFileEdit = new JTextField()
protected

Field for capturing the executable's harvest reply file.

◆ m_jExecutablePathEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jExecutablePathEdit = new JTextField()
protected

Field for capturing the executable's path and filename.

◆ m_jExecutableUpdateOutFileEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jExecutableUpdateOutFileEdit = new JTextField()
protected

Field for capturing the executable's update reply file.

◆ m_jFileColumnsList

JList<String> sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jFileColumnsList
protected

The list displaying the file columns.

◆ m_jFileColumnsListModel

DefaultListModel<String> sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jFileColumnsListModel = new DefaultListModel<String>()
protected

The file columns for the harvest files.

◆ m_jHarvestPeriod

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jHarvestPeriod = new JTextField()
protected

Field for capturing the harvest period.

◆ m_jNewTreeDataMemberEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jNewTreeDataMemberEdit = new JTextField()
protected

Field for entering new tree data members.

◆ m_jNewTreeDataMembersList

JList<String> sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jNewTreeDataMembersList
protected

The list displaying the new tree data members for this behavior.

◆ m_jNewTreeDataMembersListModel

DefaultListModel<String> sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jNewTreeDataMembersListModel = new DefaultListModel<String>()
protected

The new tree data members for this behavior.

◆ m_jSORTIEOutFileEdit

JTextField sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_jSORTIEOutFileEdit = new JTextField()
protected

Field for capturing the filename that SORTIE is to write.

◆ m_oBehavior

HarvestInterface sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_oBehavior
protected

HarvestInterface object.

◆ m_sHelpID

String sortie.gui.behaviorsetup.HarvestInterfaceSetup.m_sHelpID = "windows.edit_harvest_interface_window"
private

The ID of the help file for this window.

◆ mp_sAllExistingDataMembers

ArrayList<String> sortie.gui.behaviorsetup.HarvestInterfaceSetup.mp_sAllExistingDataMembers = new ArrayList<String>(0)
protected

List of existing data members, so we can make sure any added have unique names.


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