Applet basics

To use Juggling Lab in your page, you only need a single executable from the Juggling Lab distribution, called JugglingLab.jar. This archive includes two applet classes usable within a web page:

If you are only using the JugglingLabAWT class, you can use the JugglingLabAWTApplet.jar archive file instead of JugglingLab.jar; it leaves out the unused classes and is therefore a shorter download when running over the network.

In addition to these applets, the following classes can be run as command line applications:

In addition to these executable jar files, you must include the JugglingLab_source.jar file on your site as well. As stated in the Juggling Lab license, the recommended way to do this is to always include the JugglingLab_source.jar file in the same directory as the executable jar files.

Juggling Lab applet parameters

When used as an applet, Juggling Lab recognizes seven parameters within the <applet> tag. These are named config, animprefs, notation, pattern, jmldir, jmlfile, and uploadscript. Each of these parameters is optional, and is set as follows:

config
This parameter configures which interface elements are included in the applet display. It is comprised of semicolon-separated assignment settings, for example "entry=siteswap;view=jml"
animprefs
This parameter defines how the animator itself will work. (These settings are made in the "Animation Preferences" panel when Juggling Lab is run as an application.) It is comprised of semicolon-separated assignment settings, for example "threed=true;fps=10"
notation
This parameter determines which notation component will be used to parse the pattern specified in the pattern parameter below. Currently recognized values are 'jml' and 'siteswap'; default is 'siteswap'.
pattern
This parameter defines the pattern to be juggled. The text string provided here is sent to the notation component defined in the notation parameter above, for conversion to JML and animation. The expected input format varies by notation; for the notations currently implemented it is:
jmldir
An absolute link to a directory used as a base for jmlfile below. For example, http://jugglinglab.sourceforge.net/wiki_patterns/.
jmlfile
This parameter causes the applet to load a JML file from the server. If the JML file contains a pattern, it is loaded into the animator and the pattern parameter above is ignored. If the file is a pattern list, it is displayed in a "Patterns" tab attached to the left side of the applet. The format of this parameter is a UNIX-like path to the pattern file, relative to either jmldir if defined, or to the HTML document containing the applet. For example, patterns/demo.jml.
uploadscript
An absolute link to the server script for uploading JML files. This is used by the "Save to Server" function. For example, http://jugglinglab.sourceforge.net/cgi-bin/JL_fup.pl.

Examples

No examples in here yet.

Look at the HTML files in the Juggling Lab distribution for examples of how you can use the applet within a web page.


Valid XHTML 1.0!