previous up next
Go backward to 3.2 Window Mode
Go up to 3 Installation and Use
Go forward to 3.4 Known Problems
RISC-Linz logo

3.3 Applet Mode

The evaluator may be embedded as an applet into an HTML page, e.g., as

<applet 
  code="Logic/Main.class" 
  archive="Logic.jar,Input.jar"
  width=500 height=150>
<param name="exec" value="
read set;\n
fun A = set(x in nat(1, 3): true, x);\n
fun B = set(x in nat(0, 1): true, x);">
<param name="input" value="term x(A, B);">
<param name="screen" value="true">
<param name="swidth" value="50">
<param name="sheight" value="50">
<param name="lines" value="6">
</applet>

In this example, the archive Logic.jar is located in the same directory as the HTML page embedding the applet. The file Input.jar is an archive of files Logic/*.txt that contains all files that can be read by the interpreter, e.g., if there exists a file Logic/set.txt, we may say in the interpreter

read set;
> file 'set.txt' read.

The evaluator applet understands the following parameters:

exec
A string that represents a command to be executed by the evaluator after the applet has been loaded. The token "\n" may be used to decompose the string into multiple lines.
input
A string that appears in the input field of the evaluator after the applet has been loaded.
screen
A flag; if this parameter appears with any value, the applet exhibits a screen that allows to use the commands plot and plots.
swidth
If screen is given, this parameter denotes the number of (logical) pixels of this screen in the horizontal direction (default 50).
sheight
If screen is given, this parameter denotes the number of (logical) pixels of this screen in the vertical direction (default 50).
lines
If screen is given, this parameter denotes the number of lines of the output field of the interpreter (default 6).

Please note that in applet mode the interpreter only executes while the focus is on the input field such that the background is gray. Otherwise, execution of the interpreter is deliberately suspended. This implies, that the interpreter does not execute when the embedding Web page is not visible or the browser is iconified.


Maintained by: Wolfgang Schreiner
Last Modification: September 16, 2004

previous up next