|
ION Java User's Guide: Using ION's Pre-Built Applets |
|
The IONGraphicApplet is used to execute a series of IDL commands and display the results. Any valid IDL commands that are not explicitly excluded by the ION security mechanism (see Command Security) can be passed to the IONGraphicApplet for execution. Using the ION Applet parameters, the Applet can also display debug information and be used as a hyperlink to another HTML page.
The IDL commands can be sent synchronously or asynchronously. By default, each command is sent and the client blocks (stops accepting commands) until the command is complete. However, in some circumstances the client needs to regain control of the application immediately to be able to process user input. An example of this situation would be when a command starts an IDL routine that requires a large amount of processing. If the command is blocking, the client will not be free to receive user input or possibly even redraw itself.
In addition to the parameters described in Parameters Specified via <PARAM> Tags, the IONGraphicsApplet accepts the following parameters:
The IDL_COMMAND_* parameters specify the IDL commands to send to the ION Server. The value of each IDL_COMMAND is a valid, single line IDL command (the "$" line continuation is not supported by ION). Note that commands that are explicitly excluded via the ION security mechanism are not processed.
| Note Command numbers must be continuous, beginning with zero and ending with n. |
Set the value of this parameter to "YES" if the client should send commands asynchronously. All commands are sent in order, and control is returned to the applet as soon as the commands are sent. The default value is "NO."
If set to "YES," the applet will treat pixel values as RGB triplets when on a true-color (24-bit or 32-bit) device. (This is the default.) If set to "NO," the applet will treat the first eight bits (the red portion) of the pixel value as an index into the current color table when displaying on a true color device. For more information on decomposed color mode, see the documentation for the DECOMPOSED keyword to the DEVICE procedure in the IDL Reference Guide.
The following example creates an IONGraphicsApplet that connects to a server, generates some data, sets the color table, and displays the data using IDL's SHOW3 procedure. In the example, debugging mode is enabled, and the applet drawing area is a link to the ITT Visual Information Solutions Web page.
<APPLET NAME="CONNECTION" CODE=IONGraphicApplet.class WIDTH=200 HEIGHT=200 ARCHIVE="ion_64.zip" CODEBASE=../classes> <!-- This applet connects to host KIROC, port 8084 --> <PARAM NAME="SERVER_NAME" VALUE="KIROC"> <PARAM NAME="PORT_NUMBER" VALUE="8084"> <PARAM NAME="LINK_URL" VALUE="http://www.ittvis.com"> <PARAM NAME="DEBUG_MODE" VALUE="YES"> <PARAM NAME="SERVER_DISCONNECT" VALUE="YES"> <PARAM NAME="IDL_COMMAND_0" VALUE="a = exp(-(shift(dist(30), 15, 15)/7)^2)"> <PARAM NAME="IDL_COMMAND_1" VALUE="loadct, 1"> <PARAM NAME="IDL_COMMAND_2" VALUE="show3, a"> </APPLET>
IDL Online Help (March 06, 2007)