tags:

views:

338

answers:

5

I am currently reading about SWT. There is often written, that Eclipse as an SWT application looks like the standard GUIs of the host platform or OS. But I dont think so. At least under windows the tabs of the eclipse views does not look like the standard windows tabs.

Why is this? Was this ever different? What about other SWT application?

+2  A: 

SWT mixes native and emulated (painted) widgets. So I suppose for some widgets look and feel may slightly differ from the platform. More on that here

DroidIn.net
+7  A: 

It really gives you native look and feel where possible. On some platforms you don't find native versions of all the controls in SWT and then they have to be emulated.

Regarding the "tab controls", SWT does support the standard tab control which is part of Win32 (and when you run it on OSX you will see one of the standard OSX tab controls, the blue) but Eclipse has created a new control that is much more flexible than the one you see in the Eclipse GUI. This is not at all an Eclipse specific thing to do, you see Microsoft develop extended controls for Office and there are non standard versions of controls in just about every software available.

One can argue if it is worth creating a control which does not look like what users are used to but in the case of the tab control, extending the standard tab control to the point where it had all the features eclipse uses would give just as much of a non standard feeling. IMHO, it is probably less confusing to create something that doesn't even pretend to have the look and feel of the standard one but rather works identical on every platform where you can run eclipse.

Fredrik
+2  A: 

Apart from on Mac (mostly), native GUIs don't look like native GUIs any more.

soru
Tom Hawtin - tackline
Windows does have native tabs, though (see: Tabbed dialogs) and Eclipse's tabs are definitely different.
R. Bemrose
Interestingly, the few tabbed dialogs in Eclipse (e.g. search) do look to use native tab controls. The custom tabs are only used for opening multiple files, an area you will struggle to find a pair of Windows applications that work identically. Presumably everyone on the IE, Excel, Outlook, Word, etc. teams agreed the 'standard' way of doing it was unusable. It's just that that's as far as their agreement went.
soru
A: 

One reason for the specific example you gave might be that Windows' native tabs look plain awful.

Esko
A: 

From what I gathered, SWT project is mostly driven by the needs of Eclipse project - and Eclipse's objective is to develop it's own distinctive look, at least as far as tabs are concerned. Eclipse is probably the only notable application which uses SWT; apart from Eclipse and Eclipse plugins, SWT mostly lost its battle with Swing.

EDIT: I'm not sure why this got downvoted so much; here's the article gives pretty good summary of the core of my argument. Regarding comments that "Swing sort of died", I certainly don't think so. IMO they basically said that Swing is mature GUI framework which will be supported but that they don't expect to introduce any major developments (actually, neither Swing nor SWT introduced any major features for quite some time anyway). It still remains the official and most widely used Java GUI framework. Also, this trend graph is saying a lot. :)

Domchi
This is not at all the case. A lot of companies are moving to Eclipse RCP (which means SWT) instead of having their own platform independent GUI platform to maintain. You see eclipse/SWT based applications in just about every area of the software industry. From trading desks to development tools. Swing on the other hand sort of died from a development point of view when Sun decided to put all efforts into JavaFX for GUIs. Both serves a purpose but just as the frameworks are different so are the target applications.
Fredrik
This is soooo not true! Everybody and their dog are using SWT since it far superior to AWT or even Swing
DroidIn.net
I disagree with the previous comments - just do a search on any job site for "Java Swing" vs. "Java SWT".
Nate