UniVista Programmer's Guide



Intent | Structure | Participants | Sample Code | Known Uses


Holds the information for a screen in UniVista. This means that there is a size, as well as mouse dragging information associated with it. The ScreenObject elements are actually stored in a Vector, meaning that the UI components are not resident in memory until displayScreen is called upon.



Sample Code

To display this Screen, a container must be passed to the displayScreen method. The code below shows the internals of how this method executes.
// display the screen

public void displayScreen(Container cont) {
Enumeration objs=screenVars.elements();

while(objs.hasMoreElements()) {
ScreenObject screenObj=(ScreenObject)objs.nextElement();
Component theComp = screenObj.setupUI();
// allow the container to listen for MouseEvents
screenObj.myDragger = new MouseDragger(screenObj);
if (cont instanceof ScreenMouseAdapter)

screenObj.myDragger.addScreenMouseAdapter( (ScreenMouseAdapter)cont); screenObj.myDragger.setDraggingEnabled(draggingEnabled);


Known Uses

This class is used throughout UniVista, since it is essential to nature of using Studys. A natural place to find Screen being utilized is in the StudyEditor where ScreenObjects are added. In the RunEngine, the Screen is used in a similar fashion as the StudyEditor. The reason is due to the fact that both use the ScreenRenderer, which is primarily concerned with displaying the Screen. Also, the LayoutEngines can be found to use the Screen as well.

Contact the UniVista Team | Main Page | Table of Contents