views:

191

answers:

1

Like the subject reads:

How much good-looking UIs can be built using Eclipse RCP? Can they be built to look as good as the app screen below?

Or, lets just define good being: support for rounded borders, gradient backgrounds, rich text, true type fonts and all those stuff that applies to modern rich UI look and feels.

alt text

+1  A: 

The upcoming eclipse e4 will support for eclipse itself, or RCP applications, all sort of skins including gradient-based ones.

alt text


With its new themes based on CSS like Declarative Syntax, it is really simple to contribute to a rich interface... even the latest 3.6 builds can make use of the CSS themeing support.

An example CSS-File could look like this:

.h2 {
    color: white;
    font-size: 20pt;
}

.container {
    background-color: gradient radial #575757 #101010 60%;
}

and the Java-Code to use it

final Composite p = new Composite(parent, SWT.NONE);
p.setData(CSS_CLASS_KEY, "container");
p.setBackgroundMode(SWT.INHERIT_DEFAULT);
p.setLayout(new GridLayout(2, false));

Label l = new Label(p, SWT.NONE);
l.setData(CSS_CLASS_KEY, "h2");
l.setText("This is a headline");
l.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false, 2, 1));

engine.applyStyles(p, true); // Apply the CSS-Instructions of the current active theme

The last line applies the current theme CSS-Information on all elements below the given widget.

Switching between themes is quite easy using:

engine.setTheme("org.eclipse.e4.demo.contacts.dark");

Which makes the 3.x ViewPart look like this with a radial black gradient:

alt text

or a bright one:

alt text

VonC
so this just means, there is no support as of now? are there any open source tools that would enable eclipse RCP for this kind of look and feel?
Jay
@Jay: I just completed my answer to show how "current" (actually Helios Eclispe3.6 only) versions of Eclipse can already used CSS-based themes.
VonC
@VonC: Thank You. Just what I was looking for - looks great. I will try out borders and other stuff.
Jay