next up previous
Next: Using the CG-editor Up: Java Interface Previous: A generic DII interface

Running the example

 

The MICO sources include an interactive conceptual graph editor written in Java. The sources of the example are located in the directory mico/tools/ir-browser. Note that you need the Java Developers Kit 1.1.5 as well as a parser generator for Java called JavaCUP (see chapter 2 on where to obtain these tools). We assume that you have succefully compiled the MICO sources contained in the aforementioned directory. Alternatively you can run the Java applet from your favorite WWW browser by visiting the MICO-homepage.

Two files in the ir-browser directory are of importance to run the example:

In order to run the demonstration, you first have to run the shell script runproxy. You simply do this by starting it from an UNIX shell:

  ./runproxy

After this you can load the applet by either using a Java capable browser or the appletviewer tool which is part of the JDK. You can run the applet be running the following command from an UNIX shell:

  appletviewer dii.html

Once the applet has been loaded, click on the button called Start IR browser. A new window opens. The right side of this window shows all top-level objects contained in the interface repository. For each object there is one icon. If you click on one of these icons using the left mouse button, the IDL source code of that object is shown in the left side of the window. You can ``enter'' an object using the right mouse button (this of course works only on container objects like interfaces or modules). If you press the right mouse button on an operation object, another window will open containing a conceptual graph representing this operation. You can change the input parameters of that CG before invoking it on an object.

Here is a short step-by-step tour:

  1. click with the left mouse button on the Account icon
  2. click with the right mouse button on the Account icon
  3. click on the deposit icon with the right mouse button to invoke the deposit() method
  4. click on the ULONG:0 node while holding down the shift key, enter 100 into the appearing entry box and press return
  5. use Server/Invoke to do the actual invocation
  6. click on the withdraw icon with the right mouse button in the browser window to invoke the withdraw() method
  7. click on the ULONG:0 node while holding down the shift key, enter 20 into the appearing entry box and press return
  8. use Server/Invoke to do the actual invocation
  9. click on the withdraw icon with the right mouse button in the browser window to invoke the withdraw() method
  10. use Server/Invoke to do the actual invocation
  11. the rightmost node of the graph should change to LONG:80

HINT: If you move the pointer over a node of the graph the status line will show you the actions possible on this node. For example Shift-Button1: edit means: To edit the contents of the node press the left mouse button while holding down the SHIFT key.


next up previous
Next: Using the CG-editor Up: Java Interface Previous: A generic DII interface

MICO
Tue Nov 10 11:04:45 CET 1998