Notes on using the FuncPlotter applet
These notes relate to the FuncPlotter applet that is located at http://funcplotter.sourceforge.net/applet.html.
The document that this URL refers to is called the applet page
in these notes. It is intended to demonstrate of the use of FuncPlotter
as an applet. FuncPlotter has more features when used as an
application.
-
The applet requires a web browser with
- JavaScript enabled, and
- a Java plug-in that supports Java 1.6 applets, such as the plug-in that is included in Sun's Java Runtime Environment (JRE), version 6.0 or later.
-
The applet page has been tested with the following browsers:
- Mozilla Firefox 2,
- Opera 9,
- Microsoft Internet Explorer 7.
- Further instructions for using FuncPlotter can be found in the manual.
- As is explained in the manual, the FuncPlotter applet is signed in order to allow users that trust its signature to access some of its features — in particular, the use of a configuration file and the system clipboard. If you don't need those features, it is recommended that you don't agree to trust the applet when prompted to do so. (If you don't agree to trust the applet, labels with the text "Java Applet Window" will be attached to any windows that the applet creates.)
-
The width and height of an applet must be specified as attributes of
the
<object>or<applet>element with which the applet is included in an HTML document. This is problematic in the case of FuncPlotter because the applet's actual dimensions, which are dependent on the platform and on some of the applet's configuration properties, are known only after the applet has been initialised. - The cross-platform Java look-and-feel (called Metal) and the Lucida Sans font, which is provided with Sun's Java 6 Runtime Environment, have been chosen to minimise the problem, described in the previous paragraph, of having to specify the width and height of the applet in the HTML document.
- If you link to the applet page, you can configure the applet with parameters in the query component of the URL that refers to the page. The parameters can include the location of a configuration file. Details of how to do this are given below.
- By default, Sun's Java Runtime Environment caches the applets that are run with its plug-in, so the FuncPlotter applet won't be downloaded every time you access the applet page. You can remove items from the cache with the Java Control Panel.
Configuring the applet with a query string
The query component of a URL — or, more generally, a URI — is the part of the URL that starts at the first "?" character and ends at the next "#" character or at the end of the URL. You can pass configuration parameters to the applet on the FuncPlotter website by including a query string containing the parameters in the URL that is used to request the applet's page (eg, the URL reference in a hyperlink or the URL that you enter into a browser's location bar).
The query string consists of a "?" followed by one or more parameters. The form of a parameter is <name>=<value>, and parameters are separated with a "&". Characters that are not unreserved or used as delimiters within the query component (including spaces and some punctuation characters) should be percent-encoded; that is, replaced with a "%" character followed by a two-digit hexadecimal sequence of their US-ASCII code; eg, "%20" for a space and "%2C" for a comma (",").
The parameters that can be used in the query string are listed in the
section on configuration
parameters in the FuncPlotter manual. Each configuration parameter
must have the prefix "app.". In addition,
parameters named width and height (without an
app. prefix) can be used to specify, respectively, the
width and height attributes of the applet in
the HTML <object> element.
If several configuration parameters are to be specified, it may be
easier to incorporate them into a configuration file and to specify the
directory of the file with the app.configPath parameter.
The file must be named funcPlotter.conf, and it must be
accessible to the applet. You can download a configuration file with default property
values that you can edit. (Your configuration file need only
contain properties whose values differ from the defaults.)
Some browsers may cache the applet page with its "clean" URL (ie, the URL without the query component) as the key. If you modify the query string, your browser may retrieve the cached version of the page, so the changes you have made will appear to have had no effect. If this seems to be happening, try clearing the browser's cache or, if this has no effect, restarting the browser.
Examples
In the following examples, the URL has been split into two lines for convenience. In reality, the URL must be a single line with no breaks.
This query string specifies the dimensions of the applet and a Windows look-and-feel with a plot size of 520 (width) × 500 (height):
app.lookAndFeel=Windows&app.plot.size=520%2C500
This query string specifies the dimensions of the applet and a
configuration file in the directory /home/slothrop/config
on the local file system:
app.configPath=file:///home/slothrop/config