chrome config examples

Gerald Bauer <[email protected]> Wed, 28 Jan 2004 01:56:50 -0800 (PST)
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Hello R. Dale Asberry,

> How should the properties below be defined for this
> situation?
> 
> chrome=installer
> chrome.installer=?

  As far as I can tell it should be

   chrome.installer=ChromeAnchor

  or if your chrome is a jar in jar:

   chrome.installer=class://ChromeAnchor/chrome.jar


  For more examples on how to bundle your chrome with
your installer's jar please check out the Ramses
example suite.

Here's the calc-prod.properties file:

# calc.properties

chrome=calc
chrome.calc=ChromeAnchor


Instead of using a properties file you might wonna
configure your chrome loader directly. Please check
the Ramses Mini example for an example.

Here's the code snippet from AppFrame.java:

XulManager xul = XulManager.getXulManager();

/*
File chromeRootDir = new File(
"c:/sandbox/ramses/src/chrome/mini" );
ChromeFileResourceLoader loader = new
ChromeFileResourceLoader( chromeRootDir );
*/

// assume chrome is bundled with the app's jar
//  use class demo.mini.Tool as resource anchor
ChromeJarResourceLoader loader = new
ChromeJarResourceLoader( Tool.class );

xul.setResourceLoader( loader );


Hope this helps.

  - Gerald

PS: If you want to use a chrome jar in a jar. Here's
the "real-world" Venus Application Publisher
properties file code snippet:

chrome=beta1
chrome-beta1=class://Chrome/chrome.jar

chrome.clare=beta1
chrome.clare.beta1=class://Chrome/chrome-clare.jar

chrome.hazel=beta1
chrome.hazel.beta1=class://Chrome/chrome-hazel.jar

chrome.vanessa=beta1
chrome.vanessa.beta1=class://Chrome/chrome-vanessa.jar

chrome.pam=beta1
chrome.pam.beta1=class://Chrome/chrome-pam.jar

chrome.alice=beta1
chrome.alice.beta1=class://Chrome/chrome-alice.jar


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn