UniVista Programmer's Guide

UniVista.gui

RunEngine


Intent | Structure | Participants | Sample Code | Known Uses

Intent

Given a valid Study, the RunEngine creates Run objects for that particulr Study. Once created, the RunEngine allows the user to navigate through the various Screens of the Study and alter the data UI elements. The option is then given to save the current Run, whic maintains the entered data of the UIs, into the database. It is also possible to export the data of the UIs into some prescribed output formats, i.e. Fortran namelists.

Structure

Participants

Sample Code

Switching between Screens requires some means of memoization for the sake of navigating to a previous Screen. The displayScreen method does just that. In addition, disables the movement of the ScreenObjects and updates the ScreenRenderer.
// display a screen

public void displayScreen(Screen toDisplay) {
 // push the current screen onto the stack

 if(currentScreen!=null) {
   BackButton.setEnabled(true);
   backStack.push(currentScreen);
 }

 // display the current screen
 currentScreen=toDisplay;
 currentScreen.setDraggingEnabled(false);

 renderer.setScreen(currentScreen);
 updateTitle();
}

Known Uses

This class is instantiated from the main menu class, also known as UniVistaMain. The nature of the RunEngine is not far from that of StudyEditor, since both utilize the ScreenRenderer which in turn uses Screens and Studys.



Contact the UniVista Team | Main Page | Table of Contents