'''XWT''' stands for '''[[Eclipse]] XML Window Toolkit'''. It is a powerful and lightweight declarative UI framework designed for Eclipse, based on XML as markup language.

'''XWT''' stands for '''[[Eclipse]] XML Window Toolkit'''. It is a powerful and lightweight declarative UI framework designed for Eclipse, based on XML as markup language.

−

XWT simplifies UI development by a physical separation of UI definition in XML from the run-time logic in programing language. It is very intuitive for creating interfaces directly or via tools such as Visual Editor<reference>http://code.google.com/javadevtools/wbpro/index.html</reference>. Especially for people with a background in web design and technologies.

+

XWT simplifies UI development by a physical separation of UI definition in XML from the run-time logic in programing language. It is very intuitive for creating interfaces directly or via tools such as Visual Editor<ref>http://code.google.com/javadevtools/wbpro/index.html</ref>. Especially for people with a background in web design and technologies.

Revision as of 16:21, 7 August 2011

What is XWT?

XWT stands for Eclipse XML Window Toolkit. It is a powerful and lightweight declarative UI framework designed for Eclipse, based on XML as markup language.

XWT simplifies UI development by a physical separation of UI definition in XML from the run-time logic in programing language. It is very intuitive for creating interfaces directly or via tools such as Visual Editor[1]. Especially for people with a background in web design and technologies.

The extension attribute x:Class declares the Java class to handle all events. The Button event is handled by clickButton method in the class ui.EventHandler. The association is setup during the loading:

If we bind the text attribute of Label to a property “Name” of a Person, here is the data binding expression:

<Labeltext="{binding path=Name}"/>

It has the same result as following, but the expression is in pure XML:

<Label><Label.text><Bindingpath=”Name”/></Label.text><Label>

The data context of Label should be a person.

JFace integration

The following example shows the JFace direct integration with ListViewer.

We have a Class Company that has a name and a collection of Employee. The company is bound to the root Composite object. The child Text is bound to Name of company and ListViewer to property employees of type Java Collection.

Style

XWT is a high extensible framework. It can be extended easily in almost all aspects, including Style. When we talk about the Style, we talk about CSS in general. Indeed, CSS is one of more used declarative style solution in Web. But it is not the only one.

From the point of view of its definition, there are two kinds of style: inline style and external style. Inline style is defined in UI resource file. External style is specified in a separated file.

XWT provides a general style concept.

Inline style

External style

Basic concept

CSS

Dynamic UI

Control binding

Control binding is a kind of data binding, but UI control is used as data binding source.