Novocode - Open Source XUL Framework for Eclipse/SWT

Gerald Bauer <[email protected]> Mon, 28 Mar 2005 12:49:22 -0800
Newsgroups gmane.comp.lang.xul.announce
Message-ID <[email protected]>
Hello,

      Stefan Zeiger has released an Eclipse-licensed open source 
framework that lets you build Eclipse applications using XML.

      Stefan writes:

NAF resource files (*.naf) are XML files which describe GUIs as a tree 
of Widget elements. Here is the simple hello.naf file used by 
HelloExample.java:

<?xml version="1.0" encoding="UTF-8"?>

<Shell title="HelloExample" resize="false"
     xmlns="http://www.novocode.com/namespaces/naf">

     <Label text=" Hello, World ! " font="Arial Black, 0.5in" />

</Shell>


The first line is the usual header which is found in all XML files. The 
root element is named Shell which translates to the class 
com.novocode.naf.gui.NGShell. All elements in NAF resource files use 
the NAF namespace which is declared in the root element with the 
special xmlns attribute 
(xmlns="http://www.novocode.com/namespaces/naf"). The other attributes 
belong to the NGShell widget. Quite obviously, title  sets the window's 
title and resize="false" makes the window non-resizable. The window 
contains only one widget, a Label (class com.novocode.naf.gui.NGLabel). 
The label's text is set with the text attribute. The font attribute 
specifies the font for the label (in this case Arial Black with a 
height of 0.5 inches). This attribute is available for all widgets but 
it may be ignored in some cases (e.g. the font specified on a Button 
will be used when the button is used as a Control but not when it is 
used as a MenuItem).

Note that no layout has been specified for the Shell in this example, 
so the default FillLayout will be used. This makes the Shell's client 
area the size of the Label.

    Find out more @ http://www.novocode.com/naf

     - Gerald



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click