|Overview . Tutorial . SVG Plugin . Applet Interop . Java Bean Interop . Download . Petra @ Sourceforge|
Luxor's Applet Plugin Example Suite holds a bunch of apps that show how to turn applets into XUL tags that you can use along with all built-in XUL tags without writing any Java glue code. Reuse your applets today in your very own apps without calling in any browser machinery.
Starting with Luxor Beta 9 you can plug-in applets and turn them into XUL tags. Pop a simple XML config file into your app's chrome config folder and your applets are ready-to-use along with all built-in XUL tags.
Hello Applet Plugin Tutorial.
To help you get started I show you how to plug-in the
and turn it into a
for creating greetings such as "Salve Roma" or "Hello Tokyo".
The markup for using the
HelloApplet in a classic pre-XUL area HTML browser
<applet code="demo.hello.HelloApplet.class" width="300" height="100" > <param name="greeting" value="Salve Roma" > </applet>
turns up cleaned up in XUL
<hello greeting="Salve Roma" style="width: 300; height: 100" />
and comes up on your screen as follows:
Plug It In, Plug It In.
To plug-in your own applets and turn them into XUL tags such as
config folder to your app's chrome folder hierachy. Example:
<appletdef>s inside the
root tag to
spice up Luxor with your own applet-powered tags.
<appletdef> requires two attributes:
your applet's new tag name such as
and your applet's main Java class such as
Example: Applet Plugin Settings
<config> <appletdef name="hello" class="demo.hello.HelloApplet" /> </config>
You don't need to worry about configuring your applet's parameters such as
because Luxor turns them automatically into attributes.
Store your applet plugin config settings in the
config folder, say,
Note, that you can choose whatever name you like because
Luxor picks up all files in the
to configure itself once you call
That's it. Now you can use
like a built-in XUL tag in your app's chrome.
<hello> Applet Plugin in Action
<vbox id="CONTENT"> <groupbox> <caption label="Applet Demo I" /> <hello greeting="Salve Luxor" style="width:300; height:100" /> </groupbox> <groupbox> <caption label="Applet Demo II" /> <hello greeting="Hello Luxor" style="width:300; height:100" /> </groupbox> </vbox>
Packing Your Applets. Note, that Luxor doesn't load your applets on-demand over the net like a classic HTML browser instead Luxor assumes that you already shuffled all your applets' jars onto your harddisk and included the applets' jars to your classpath.
Luxor's applet plugin support is experimental (that is, not complete yet).
Luxor doesn't support any applet services such as
getAudioClip() and others
|Hosted by SourceForge||Send your comments, suggestions, praise or poems to email@example.com||Copyright © 2003 Gerald Bauer|