SourceForge.net Logo

Widget Layout Compiler

Project Page

A markup language for Java GUI widgets based on class names and methods intended to help the definition of a widget follow the widgets structure.

A widget is described in terms of nested blocks, to reflect its structure, and the actions needed to set the widgets attributes. For example, the widget description:

 Window(10, 10)
{
Label("Some Text")
{
\setFore(Blue)
\setBack(Yellow)
}
\setFore(White)
\setBack(Black)
}
generates Java code (similar to):
 Window tmp1 = new Window(10, 10);
Label tmp2 = new Label("Some Text");
tmp2.setFore(Blue);
tmp2.setBack(Yellow);
tmp1.add(tmp2);
tmp1.setFore(White);
tmp1.setBack(Black);

Widgets can be defined as variables, functions or as new classes. The language also supports macro definitions and embedded Java code. The output of the compiler is straightforward Java code which can be compiled by any Java compiler without needing additional libraries.

The compiler is available from the project page


© Copyright 2005, M Wahab (email).