Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

Applet

Summary: Use Java Applets in PmWiki pages
Version: 2007-12-05
Status: Stable
Prerequisites: pmwiki-2.0.beta26
Maintainer: Dfaure
Download: applet.phpΔ

Description

The applet.phpΔ script provides an (:applet:) markup to handle this.

Proceed to installation steps as usual for cookbook recipe scripts.

Notes

Java Applet Installation

  • Put the java applet files (usually .class hierarchies or .jar) into pub/applets subdirectory (that you may need to create).
  • If required, extra subdirectories may be used to separate several applets.

Markup usage

Once installed, the following markup is available:

(:applet PARAMETERS... :)

with the following parameters:

code=CLASS
The applet entry point class (required).
width=..., height=...
The applet geometry (required).
archive=JAR
The applet jar archive name (optional, to be used if the applet is provided as an archive).
codebase=SUBDIRECTORY
The extra subdirectory specification needed to reach the applet (optional, the trailing slash is required).

All other supplied parameters are forwarded to the selected applet:

MY.PARAM=MY_VALUE
is translated as <param name='MY.PARAM' value='MY_VALUE' /> tags.

Example

As a live example, you may have a try with the Free JDK Demo Clock applet provided by Sun here:

  • Download the demo archive and extract it into your pub/applets
  • Use the markup below (on a single line) to display the clock:
(:applet codebase="demo/clock/classes"
         code="JavaClock.class"
         width="150" height="150":)

Life example: CalculatorApplet (adjusted by PKHG)

History

2007-12-05
Solved (at last) the $PurDirUrl issue.
2006-10-28
Added RecipeInfo data.
2005-10-31
Initial release.

Contributors

Dfaure

See Also

PTViewer

Comments

Edit - History - Print - Recent Changes - Search
Page last modified on April 18, 2008, at 03:45 AM