Reusing/Installing Chrome and Java Code

F Baube <[email protected]>
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Disclaimer: At first I thought this was a simple question about reusabi-
lity in Luxor, but I see that it is turning into a "blue sky" question.

I see that many of the sample programs (in ramses) duplicate each other's 
code, to implement common functions.  Examples: CmdCut, FileOpen, TreeModel.  
Is it possible to factor out some of these useful functions and copy them 
into libraries ?  

To describe a more concrete scenario, is it possible to bundle together 
XUL _and_ Java code _and_ icons _and_ all of the interconnections into 
a package (call it "Package P") that is reusable by another Luxor appli-
cation (call it "App A") ?

This "reuse of Package P by App A" could be done at App A's compile time 
or at App A's run time.   To do it at compile time would be more or less 
equivalent to providing 

- a jar file "P.jar", plus 
- a simple installation procedure "P_install(...)", which takes as an 
  argument a reference to (for example) a JPanel ... the "installer" 
  could (on its own) find the JPanel's menubar, text display area, etc.

If it can be done at App A's RUN time, i.e. click on a Luxor package P
 and have it permanently added to App A, then I realize that what I am 
asking about is equivalent to Mozilla XPI !  Or, to Java WebStart itself !

This would make Luxor as extensible as Mozilla, with the full power of 
Swing's UI and Java's networking capabililties, and without the need to 
_ever_ resort to Javascript  :) :)

Perhaps it would be doable if these extension packages were delivered 
as extensions to JPanel (or JComponent), with all menu items, buttons, 
etc. "pre-wired".  I am not sure.

Examples: each of these subsystems would comprise, at a minimum, a menu 
plus an hbox containing toolbar icons plus Java code for command processing:

-  a "File" package, to make file-oriented operations "drop-in"
- an "Edit" package, to make simple editing capabilities and clipboard access "drop-in"
-  a "Mail" package (based on a Datagrid), for fetching, viewing, and processing email

This level of extensibility requires a very well-defined platform and 
a very capable extension API that permits menus items, icons, and code 
to be inserted almost anywhere into the pre-existing UI.


fred baube
[email protected]



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.