javawrapper::MainWindow Class Reference

Main application window. More...

List of all members.

Public Member Functions

 MainWindow ()
 Constructor.
void SendMessage (ModelMessage oMsg)
 SendMessage accepts a message from the interface.
GUIManager GetDataManager ()
 Gets the GUI manager.
void SetModelState (int iState)
 Sets the current window state.
int GetModelState ()
 Gets the current window state.
void actionPerformed (ActionEvent oEvent)
 Manages window events.
void UpdateChartChoices ()
 Updates the chart choices in the data visualization panel according to the file which is selected in the file list.

Public Attributes

HelpBroker m_oHelpBroker
 JavaHelp class for managing help displays.

Protected Member Functions

void DoFileCloseData ()
 Closes an open output file.
void CloseOneDataFile (String sFileName)
 Closes a single output file and manages the file list.
void DoFileSave ()
 File | Save Parameter File action performed.
void SetCursorToDefault ()
 Changes the cursor to the default.
void processWindowEvent (WindowEvent e)
 Ensures the application closes when this window closes.

Protected Attributes

GUIManager m_oDataManager
 Manager controlling all functions related to creating and editing parameter files and running the model.
DataVisualizerManager m_oDataVisualizerManager
 Manager controlling all functions related to output data visualization.
HelpSet m_oHelpSet
 The HelpSet object for the help file - class is from JavaHelp.
JMenuItem m_jMenuFileNew
 File - new menu item.
JMenuItem m_jMenuFileBatchNew
 File - new batch file menu item.
JMenuItem m_jMenuFileOpen
 File - open file menu item.
JMenuItem m_jMenuFileSave
 File - file save menu item.
JMenuItem m_jMenuFileOpenData
 File - open output file menu item.
JMenuItem m_jMenuFileCloseData
 File - close output file menu item.
JMenuItem m_jMenuFileSetDir
 File - set working directory menu item.
JMenuItem m_jMenuFileExit = new JMenuItem("Exit", KeyEvent.VK_X)
 File - exit menu item.
JMenuItem m_jMenuEditTree
 Edit - tree setup menu item.
JMenuItem m_jMenuEditGrid
 Edit - grid setup menu item.
JMenuItem m_jMenuEditFlow
 Edit - model flow menu item.
JMenuItem m_jMenuEditParameters
 Edit - parameters menu item.
JMenuItem m_jMenuEditDisturbance
 Edit - episodic events menu item.
JMenuItem m_jMenuEditHarvInter
 Edit - harvest interface menu item.
JMenuItem m_jMenuEditOutput
 Edit - output options menu item.
JMenuItem m_jMenuModelRun = new JMenuItem("Run", KeyEvent.VK_R)
 Model - run menu item.
JMenuItem m_jMenuModelRunBatch = new JMenuItem("Run Batch...")
 Model - run batch menu item.
JMenuItem m_jMenuModelPause = new JMenuItem("Pause", KeyEvent.VK_P)
 Model - pause menu item.
JMenuItem m_jMenuModelStop
 Model - stop menu item.
JMenuItem m_jMenuHelpContents
 Help - contents menu item.
JMenuItem m_jMenuHelpAbout = new JMenuItem("About", KeyEvent.VK_A)
 Help - about menu item.
JComboBox m_jChartChoicesComboBox = new JComboBox()
 Holds the chart choices for the currently open output files.
JComboBox m_jFileChoicesComboBox = new JComboBox()
 Holds the list of currently open output files.
JTextField m_jParameterFileField = new JTextField()
 Field in the status bar holding the parameter file.
JTextField m_jModelStatusField = new JTextField()
 Field holding the model status.
JTextField m_jMessagesField = new JTextField()
 Field holding model messages.
JButton m_jModelRunButton
 Button for running model.
JButton m_jModelStopButton
 Button for stopping model.
JButton m_jModelPauseButton
 Button for pausing model.
JButton m_jModelStepForwardButton
 Button for stepping model.
JButton m_jModelLoadOutputButton
 Button for loading run's output.

Package Functions

void DoDrawChart ()
 Draws a chart upon selection in the data visualizer panel.

Classes

class  RunListener
 Runs the window's timer code while the C++ core is running. More...


Detailed Description

Main application window.

The main application window has two main functions; creating and editing parameter files for running the model, and viewing the output generated. To run these functions, it has a separate manager object for each. The rest of the components in this window are for GUI display.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.1
Todo:
Window icon

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
May 4, 2004: Added the Harvest window (LEM)
July 30, 2004: Added the ability to close output files (LEM)
November 8, 2004: Added pause run and stop run functionality (LEM)
November 12, 2004: Added Help->About (LEM)
November 17, 2004: Added the run control buttons panel (LEM)
November 18, 2004: Added real-time data visualization (LEM)
March 31, 2005: Added batch file choice and upgraded version number to 1.1 (not that I've been very good about this) (LEM)
October 13, 2005: Added scroll bars (LEM)


Constructor & Destructor Documentation

javawrapper::MainWindow::MainWindow (  )  [inline]

Constructor.

Draws the window.


Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Function Documentation

void javawrapper::MainWindow::SendMessage ( ModelMessage  oMsg  )  [inline]

SendMessage accepts a message from the interface.

Parameters:
oMsg Message to accept.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::MainWindow::DoDrawChart (  )  [inline, package]

Draws a chart upon selection in the data visualizer panel.


Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

GUIManager javawrapper::MainWindow::GetDataManager (  )  [inline]

Gets the GUI manager.

Returns:
The GUI manager.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::MainWindow::DoFileCloseData (  )  [inline, protected]

Closes an open output file.

All open windows related to this file are closed as well.
Edit history:
------------------
July 30, 2004: Created (LEM)
May 8, 2006: Added "All" option if there is more than one file (LEM)
April 17, 2007: Made it so that if there's a single file, it just closes (LEM)

void javawrapper::MainWindow::CloseOneDataFile ( String  sFileName  )  [inline, protected]

Closes a single output file and manages the file list.

Parameters:
sFileName String File to close.

void javawrapper::MainWindow::DoFileSave (  )  [inline, protected]

File | Save Parameter File action performed.

This is a request to save a parameter file. The request is passed to the GUI manager for processing.


Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
November 22, 2005: Made it so that the save dialog would display the name of the last parameter file

void javawrapper::MainWindow::SetModelState ( int  iState  )  [inline]

Sets the current window state.

Parameters:
iState State to set to. Should be one of the choices in MainWindowStateSetter.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int javawrapper::MainWindow::GetModelState (  )  [inline]

Gets the current window state.

Returns:
int Current state. This matches one of the choices in MainWindowStateSetter.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::MainWindow::SetCursorToDefault (  )  [inline, protected]

Changes the cursor to the default.

This is a separate function so it can be called from the private inner class created in DoModelRun().

void javawrapper::MainWindow::actionPerformed ( ActionEvent  oEvent  )  [inline]

Manages window events.

Parameters:
oEvent Event triggered.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::MainWindow::UpdateChartChoices (  )  [inline]

Updates the chart choices in the data visualization panel according to the file which is selected in the file list.


Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::MainWindow::processWindowEvent ( WindowEvent  e  )  [inline, protected]

Ensures the application closes when this window closes.

Parameters:
e WindowEvent Window event.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:34:54 2007 for SORTIE Java Interface by  doxygen 1.5.2