Getting Started
As with all JWAVE applets, you need to create a client-side component (the applet) and a server-side component (the JWAVE wrapper), as explained in
Chapter 4: JWAVE Graphics and
Chapter 5: JWAVE Server Development. To use the advanced features effectively, your JWAVE applet must register as a listener for the desired feature. A basic understanding of the Java 1.1 event model will be useful in implementing the advanced features.
Client-Side Development
To interact with a JWAVE Viewable object you must first plan and create a JWAVE applet that does the following:
Extend one of the 2D or 3D JWaveCanvases or JWavePanels.
Register as a listener for the desired user interaction feature.
Create a connection to the server.
Execute a PV‑WAVE wrapper function.
Display graphical results, such as an image or surface.
Server-Side Development
As with all JWAVE applets, you also need to write a JWAVE wrapper function, or set of functions, to generate the graphical output that is displayed in the client applet.
In some cases, the wrapper function may need to return data if the applet is to execute some of the features on the client side. For example, with the PickPoint feature, JWavePanel2D will return the x and y location where the point was selected on the Panel. If the applet is to display the value of the data where the mouse click occurred, then x and y can be used as indices into the 2D array of data to obtain the data value and display the data in the graphical user interface. For an example see RW_DIR/classes/jwave_demos/canvas2d/demo.java.
Example Applets
To get a feel for how these advanced features work, you can run a set of example applets.
Each example demonstrates one or more of the advanced features and contains comments that explain how they are added.
For more information on using these example applets, see the next section,
"Running the Demonstration Applets".