Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] From Swing to SWT

Michael,

I have been studying this problem for a while and do not see any clean solution. The problem is that neither j.a.Component & Container, nor o.e..swt.Widget and its descendants implement a meta data interface which makes inspection of properties of a widget possible. Thus a conversion tool or a Builder are hard to do for both Swing and SWT!

I have written a short expose on the subject of property and meta data in a GUI and there is a JSR on this very topic.

http://opendoors.com/conga/2.2/docs/property/siframes.html
is a little presentation I wrote on the importance of the property exchange pattern which allows two objects that have no prior knowledge of one another to establish a protocol (aka Interface) to exchange structured information. This is your case. You need a translator that has a protocol map that can look at the dynamic state of your Swing app (not the static code) and then use that property information to map to a corresponding SWT tool.

I really wish I could tweak the base class of the SWT to make it a little more GUI builder friendly along the lines of what I work with in Conga.

Everytime I study the base class of SWT, I become more frustrated. For example, it is very important that every widget have a local, relative name. There is no setName(), getName(). There is no setProperties(ProperyList), getProperties(PropertyList). Sigghhh.

-lane

Michael Privat wrote:

Hi all,

I would be very interested to hear some opinions regarding a process to
convert a swing based application to a SWT based application. I know
there is some effort to create a standard SWT_AWT and vice versa
container to allow mixing the two toolkits but I am interested in
knowing if there are any patterns one might try to follow when
converting to minimize the effort.

Cheers
Michael


--
Lane Sharman
http://opendoors.com Conga, GoodTimes and Application Hosting Services
http://opendoors.com/lane.pdf BIO






Back to the top