[ Return to Technical Manual Index ]
The GUI is implemented as an Java application using JFC ( Swing ) component. The choice of JFC over AWT was mainly due to the added and improved GUI features included in JFC. The learn more about JFC/Swing, visit sun's Java site. To run the GUI, either Java 1.2/2.0, JRE 1.2, or Java 1.x plus Swing 1.x must be installed in the computer.Compiling and Running the Java code
To run the GUI ( and start the model ), use the command "[ java_path ]/bin/java HydroGUI", where [ java_path ] is the directory in which Java 1.2/2.0 is installed.
Implementation Details - Link to Java Class Descriptions
This class is the implementation of the GUI itself. The GUI is implemented as a frame consists of 4 tabbed panes. Each pane has relevent options used to construct the rhesyss command line. When the user click on any of the "Browse" button besides any of the file selection fields, a file chooser will appear in which the user can choose the file to use. In the second pane, if a user choose any of the options, buildDialog() method will be invoked and an input dialog will appear for the specific field. When the button "Build Command Line from Input" is click in the fourth pane, the GUI will call buildCommand() method, which will build a CommandObj and display a command line in the Command Line field in the pane. When the user choose to override the command line, then choose "Build Command Line from Input", the method parseAndSet() will be invoked. It will parse the command line inputed and extract information to build a CommandObj. The event after "Start Simulation" button is clicked is explained in the GUI/Model Communication section of this manual.
This is the implementation for the grass2world invokation dialog. The dialog has option fields for user to input necessary parameters to start grass2world program, or it can invoke a file chooser to let the user choose the directoy in which the template file for grass2world is located. The actual invokation of grass2world is yet to be implemented
This is the representation of a output variable. An output variable consists of four attributes: name, start time, end time, and time interval. The class consists of all the necessary setter and getter functions. The objects of output variables are stored in an object of CommandObj as an element of a vector after the simulation starts.
This is the start-up frame of the GUI. It is called by HydroGUI at its initialization.