Sophie Network: Vamp HQ - Luxor XUL - Ajax - Rachel - Lopica - Shark - Viva - XUL Alliance - The Saturn Times - The Richmond Post
Luxor Family: Luxor - Luxilla - Petra - Luxor Contrib - The Memphis Sun
Petra Logo
Luxor XUL (XML UI Language) Plugin Central
Overview . Tutorial . SVG Plugin . Applet Interop . Java Bean Interop . Download . Petra @ Sourceforge

Luxor Java Bean Plugin Example Suite

What is Luxor's Java Bean Plugin Example Suite?

Luxor's Java Bean Plugin Example Suite holds a bunch of apps that show how to turn Java Beans such as Swing UI widgets into XUL tags that you can use along with all built-in XUL tags without writing any Java glue code.

Turn Java Beans (Swing UI Widgets) Into XUL Tags - Getting Started Guide

Starting with Luxor Beta 9 you can plug-in Java Beans and turn them into XUL tags without writing any Java glue code. Pop a simple XML config file into your app's chrome config folder and your Java Beans such as Swing UI widgets are ready-to-use along with all built-in XUL tags.

Plug It In, Plug It In. To plug-in your own Java Beans and turn them into XUL tags such as <jbutton> or <jlabel> add a config folder to your app's chrome folder hierachy. Example:

Use <beandef>s inside the <config> root tag to spice up Luxor with Java Bean powered XUL tags. <beandef> requires two attributes: your Java Bean's new tag name such as jbutton and your Java Bean's class such as javax.swing.JButton.

Example: Java Bean Plugin Settings

<config>
  <beandef name="jlabel"  class="javax.swing.JLabel" />
  <beandef name="jbutton" class="javax.swing.JButton" />
</config>

Store your Java Bean plugin config settings in the config folder, say, in plugins.xul. Note, that you can choose whatever name you like because Luxor picks up all files in the config folder to configure itself once you call XulManager.configure().

That's it. Now you can use <jbutton> or <jlabel> like a built-in XUL tag in your app's chrome.

Example: Java Bean Plugins in Action

<vbox id="CONTENT">
  <groupbox>
    <caption label="Bean Demo" />	 

    <jlabel  text="Luxor Rocks" />
    <jbutton text="Yup" />
    <jbutton text="Big Time" />

  </groupbox>
</vbox>
Limitations. Under Construction.

Luxor's Java Bean plugin support is experimental (that is, not complete yet). Luxor currently only supports Swing UI widgets derived from the java.swing.JComponent class. Luxor currently supports only simple properties and uses the Jakarta Commons Bean Utils package to set properties at runtime using reflection. See the Jakarta Commons Bean Utils package for supported data types (converters). Luxor currently doesn't support nested tags for Java Bean plugins.

Hosted by SourceForge SourceForge Logo Send your comments, suggestions, praise or poems to webmistress@vamphq.com Copyright © 2003 Gerald Bauer