Legion 1.2
Basic User Manual

7.0 Graphic user interface

The Legion graphic user interface (GUI) is a Java application that allows users to run context-related commands in a graphic interface. The Legion GUI uses icons to represent different parts of context space (file objects, sub-contexts, etc.) and allows users to run most context-related commands from within the GUI.

The Context Manager can be run from the command-line of any platform compatible with the Java Development Kit (JDK) 1.1.3. A Windows95 client application, called the Legion Server, allows users to run the Context Manager from Windows95.

7.1 Starting the Context Manager from the command-line

Before compiling and running the Context Manager be sure that your machine has JDK.1.1.3 or later installed.

  1. Add the following to your CLASSPATH environment variable:
  2. $LEGION/src/Java/client/:$LEGION/src/UserInterface/swingall.jar:.
  3. Add the JDK bin directory to your path (i.e., /home/jdk1.1.3/bin).
  4. To compile the application and the necessary classes, go to the $LEGION/src/UserInterface directory and enter:
    $ make
  5. You must have a Legion session already running. Be sure to export the CLASSPATH variable and set your DISPLAY variable. Use the following command to start the application:
    $ legion_java ContextMgr

The Context Manager can also be run in the background, so that the command line will still be active. The window will look something like Figure 9. Note that you cannot start the ContextMgr process from outside the $LEGION/src/UserInterface directory.

7.2 Running the GUI on Windows95

Before you can run the Legion Server, a Windows95 client application, you need to follow the above procedure on a machine running a Legion session. The make command, run in step 3 above, created a file called Legion.zip in your $LEGION/src/UserInterface path. The zip file contains the classes needed to run the Server.

You also need to have either the Java Runtime Environment (JRE) version 1.1.3 or later, or JDK version 1.1.3 or later, installed on your Windows95 machine. You can download these from http://java.sun.com/products/.

7.2.1 Starting the Context Manager in Windows95

Note that you will actually be running two separate applications, one from the command line of the machine running your Legion session and one from a DOS window of your Windows95 machine.

  1. Follow the installation instructions for Windows95. You must add the bin directory for either package to your path in the AUTOEXEC.BAT file (e.g, PATH=C:\jre\bin).
  2. Copy the file Legion.zip to your Windows95 machine and unzip it (be sure that your unzip program maintains extended filenames).This will create a new directory called UserInterface, which contains the appropriate classes for running the client.
  3. On the machine running your Legion session start a Java Legion Server by typing:
  4. $ javaLegionServer &

    We recommend that you run this in the background, although it is not necessary. Once this process has started the Legion Server it will output the name of the machine it is running on and a port number to your command line.

  5. To start the client on your Windows95 machine, open a DOS window, and change the directory to $LEGION/UserInterface and type the following:
  6. $ Legion [machine name] [port]

    Use the machine name and port from the Legion output in step 3.

The Legion Java client will open in a separate window, titled the Legion Context Manager, and can be manipulated like a normal Windows95 window. The window will look something like Figure 10.

You can continue to work on the machine running your Legion session if the Java client is running in the background. Closing the DOS window will also close the Legion Context Manager window.

7.3 Shutting down the Context Manager

To shut down the Legion Context Manager, simply close the Context Manager window.

7.4 Restarting the Context Manager

To restart the command-line Context Manager, repeat step 4 in "Starting the Context Manager from the command-line." To restart the Windows 95 Legion Context Manager, repeat steps 3 and 4 described in "Starting the Context Manager in Windows 95." You will get a different port number each time you run the Context Manager.

7.5 Using the Legion GUI

The GUI can be used in place of context-related commands to manage context space: all context-related objects such as contexts, file objects, and objects are represented by icons and can be manipulated with the right and left mouse buttons.

Click the right mouse button in the Context Manager window to reveal three basic options:

Create Context

Create a new sub-context in the current context

Import File

Import a copy of a local file into Legion space. A separate window will appear, with the option to browse through local file space and specify a filter to use when copying the file into Legion space.

Import Directory

Import a local directory into Legion space or from Legion space into local disk space. A separate window, showing the local file system, will appear.

7.5.1 The GUI icons

There are five different icons in the GUI, each representing an element of context space. The context name associated with each icon will appear beneath the icon. Objects that do not have a context name will not be represented in the GUI. Clicking the right or left mouse button on icons will allow users to carry out various actions, explained below.

The context icon represents a context, similar to a Unix directory. You can change your current context by double-clicking the desired context icon with the left mouse button. Click the right mouse button to get the following options:

Move
Change the object's context name and remove the old name from context space. This will not affect any other context names that have been assigned to the object by you or any other user.
Alias
Assign another context name to the selected object. Clicking this option brings up a new window to enter in the new name. Note that you can specify a different context path, if you wish to place the name in a different context. Another object icon, with the new context name but referring to the same LOID, will appear in the appropriate context.
Get Interface
View the selected context object's interface.The information will appear in a separate window.
Get Attributes
View the selected context object's attributes. The information will appear in a separate window.
Destroy
Destroy the selected context (i.e., remove its name and LOID from Legion) and destroy any context names kept in the selected context. Note, however, that this will not destroy the objects named in that context, nor will it remove any other context names from other contexts.
Activate
Activate the selected context object.
Deactivate
Deactivate the selected context object.

The parent context icon represents the current context's parent context. Double-click the left mouse button on this icon to change your current context to the parent context. Clicking the right mouse button will produce the same options as with the context icon (above).

The class icon represents a class. You can double-click the left mouse button on a class icon to see a list of the class's instances. Click the right mouse button to get the following options:

Show Instances
Display all instances of a selected class in a separate window. See See Context Manager listing a class's instances, below, for more information about this option.
Run...
Executes a previously registered executable program class. Please see See Executing remote programs for information about registering remote programs, and See Running a remote program from the GUI for information about running remote programs in the GUI. This option will produce a separate window, which can be used to specify input and output file names. The Ctrl-p key combination will also run this process.
Move
Change the object's context name and remove the old name from context space. This will not affect any other context names that have been assigned to the object by you or any other user.
Alias
Assign another context name to the selected object. Clicking this option brings up a new window to enter in the new name. Note that you can specify a different context path, if you wish to place the name in a different context. Another object icon, with the new context name but referring to the same LOID, will appear in the appropriate context.
Get Interface
View the selected context object's interface.The information will appear in a separate window.
Get Attributes
View the selected context object's attributes. The information will appear in a separate window.
Destroy
Destroy the selected object (i.e., remove its name and LOID from Legion).
Activate
Activate the selected context object.
Deactivate
Deactivate the selected context object.

The instance icon represents an instance of a class. Click the right mouse button to get the following options:

Move
Change the object's context name and remove the old name from context space. This will not affect any other context names that have been assigned to the object by you or any other user.
Alias
Assign another context name to the selected object. Clicking this option brings up a new window to enter in the new name. Note that you can specify a different context path, if you wish to place the name in a different context. Another object icon, with the new context name but referring to the same LOID, will appear in the appropriate context.
Get Interface
View the selected context object's interface.The information will appear in a separate window.
Get Attributes
View the selected context object's attributes. The information will appear in a separate window.
Destroy
Destroy the selected object (i.e., remove its name and LOID from Legion).
Activate
Activate the selected instance.
Deactivate
Deactivate the selected instance.

The file object icon represents a file object. Double-click the left mouse button on this icon to open a text editor window displaying the file's contents. The text editor allows users to edit file objects. Click the right mouse button to get the following options:

View File
Display contents of selected file object in a separate window.
Copy
Make a copy of the file object. This will create a new object, with a new LOID and context name but with the same content.
Export File
Export a copy of a local file to local disk space.
Move
Change the object's context name and remove the old name from context space. This will not affect any other context names that have been assigned to the object by you or any other user.
Alias
Assign another context name to the selected object. Clicking this option brings up a new window to enter in the new name. Note that you can specify a different context path, if you wish to place the name in a different context. Another object icon, with the new context name but referring to the same LOID, will appear in the appropriate context.
Get Interface
View the selected context object's interface.This information will appear in a separate window.
Get Attributes
View the selected context object's attributes. This information will appear in a separate window.
Destroy
Destroy the selected object (i.e., remove its name and LOID from Legion). A "Destroy" window will appear, where you should specify whether you want to destroy just the object's context name or the object (both its context name and its LOID).
Activate
Activate the selected instance.
Deactivate
Deactivate the selected instance.

In all contexts, users can refresh the current context by clicking on the upper left hand "." current context icon (Figure 11a). Similarly, users can always get to a sub-context's parent context by double-clicking on the ".." parent context icon, to the right of the "." icon (Figure 11b). Note that the parent context icon will not appear if you are currently in your home context.

Note that changes to context space made from the command line are not automatically updated in the GUI. Users should refresh their current context as necessary. Changes made in the GUI, however, are reflected in the context space and can be viewed with command utilities (i.e., legion_ls or legion_context_list).

7.5.2 The GUI pull-down menus

The pull-down menus can be used to do the following:

File -> New-> Open New Window
Open a new Context Manager window. This will point to the same context space as the original Context Manager window.

New File
Create a new File Object. A New File window will open, where you can enter the new object's context path name, then a text editor window will open. The Ctrl-n key combination will also run this process.

New Context
Create a new sub-context in the current context

View File
Display contents of a selected textual file object in a separate window.

Import File
Import a copy of a local file into Legion space. A separate window will appear, with the option to browse through local file space and specify a filter to use when copying the file into Legion space. The Ctrl-i key combination will also run this process.

Import Directory
Import a local directory into Legion space or from Legion space into local disk space. A separate window, showing the local file system, will appear.

Export File
Export a copy of a local file to local disk space. The Ctrl-e key combination will also run this process.

Quit
Close the current window. If only one window is open, the program will exit. The Ctrl-x key combination will also run this process.

Edit -> File-> View File
Opens a Text Editor window, where you can edit the file's contents.

Copy File
Make a copy of the file object. This will create a new object, with a new LOID and context name but with the same content. The Ctrl-c key combination will also run this process.

Export File
Export a copy of a local file to local disk space. The Ctrl-e key combination will also run this process.

Class-> Run...
Executes a previously registered executable program class. Please see "Executing remote programs" for information about registering remote programs, and "Running a remote program from the GUI" for information about running remote programs in the GUI. This option will produce a separate window, which can be used to specify input and output file names. The Ctrl-p key combination will also run this process.

Show Instances
Display all instances of a selected class in a separate window. The "Show Instances" option returns several pieces of information about the selected class's instances, as shown in Figure 12 (below): it lists each instance's LOID, status, Object Address (OA: an active object's location), Host, and Vault. The "Instance" pull-down menu allows users to activate, deactivate, and destroy selected or all instances, as well as to refresh the window. The Ctrl-p key combination will also run this process.

Activate All Instances
Activate all instances of a selected class. The Ctrl-a key combination will also run this process.

Deactivate All Instances
Deactivate all instances of a selected class. The Ctrl-d key combination will also run this process.

Move
Change the object's context name and remove the old name from context space. This will not affect any other context names that have been assigned to the object by you or any other user.

Alias
Assign another context name to the selected object. Clicking this option brings up a new window to enter in the new name. Note that you can specify a different context path, if you wish to place the name in a different context. Another object icon, with the new context name but referring to the same LOID, will appear in the appropriate context.

Get Interface
View the selected context object's interface.This information will appear in a separate window. The Ctrl-g key combination will also run this process.

Get Attributes
View the selected context object's attributes. This information will appear in a separate window. The Ctrl-h key combination will also run this process.

Destroy
Destroy a selected object's path name and/or the object itself. A "Destroy" window will appear, where you should specify whether you want to destroy just the object's context name or the object (both its context name and its LOID). The Ctrl-Delete key combination will also run this process.

Activate
Activate a selected, currently inert, object.

Deactivate
Deactivate a selected, currently active, object, i.e. move it to an inert state.


Back to Getting Started sectional index

Back to Basic User Manual Table of Contents