JWAVE

Java™ Graphic Components


Creating New JWAVE Components

It is fairly easy to add your own custom graphic components by extending the base class "WaveGraph". This class encapsulates all of the communications, keyword and data support, and display/animation functions for you.

In addition to creating a new Java class, you must also create a corresponding PV-WAVE procedure for the server side to actually create the graphic display. The "waveserver" procedure handles all of the communications with the applet or application, and calls your new procedure with two arguments: an associative array containing all of the tags and data, and the path/filename of the gif or VRML file it expects your procedure to produce. Most of the server procedures will use the Z buffer device in PV-WAVE to assemble the graphics, rather than a pixmap, because there is no need to have an X display for the server. (This is not an issue for Windows 95/NT).

The Java and PV-WAVE source code is available for all of the JWAVE components, and this is an excellent place to look for templates to start with. An annotated example of a JWAVE class illustrates the basic layout for a new component. An annotated example of the corresponding PV-WAVE procedure shows the basic layout for a procedure template.


JWAVE Home Page
Copyright © 1996 - Visual Numerics, Inc.®