|Overview . Tutorial . SVG Plugin . Applet Interop . Java Bean Interop . Download . Petra @ Sourceforge|
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.
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
config folder to your app's chrome folder hierachy. Example:
<beandef>s inside the
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
and your Java Bean's class such as
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,
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.
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>
Luxor's Java Bean plugin support is experimental (that is, not complete yet).
Luxor currently only supports Swing UI widgets derived from the
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||Send your comments, suggestions, praise or poems to firstname.lastname@example.org||Copyright © 2003 Gerald Bauer|