Re: [Java-gnome-developer] Gnome Library
Brought to you by:
afcowie
From: Jeffrey M. <ku...@zo...> - 2003-06-03 00:38:31
|
On Mon, 2003-06-02 at 18:32, fer...@lo... wrote: > As SWT is a layer on top of GTK, using java-gnome should provide a little > better performance, besides access to extra gnome widgets not supported by SWT > today. This last statement is not true. Java-GNOME does perform better that SWT using GTK. This is due to the way SWT was implemented. Two concrete examples are: 1) SWT needed to support Z-order for the widgets (how composites are created). Since GTK doesn't really support this the SWT team decided to do this by creating an X window for each widget. This is the primary reason there is a refresh problem with SWT. It is not unusual to have 50 or more X windows in an application window. 2) The SWT API was created prior to the GTK port. The SWT notion of layout management was already in place. In SWT the container widget tells the child how much space it has whereas in GTK the child usually tells the container how much space it needs. In order to retrofit the SWT model to the GTK widget layout code a big hack was performed that has a negative impact. This is just two examples of differences between SWT and Java-GNOME. As I said before, the SWT API was in place and the developers of SWT had to write code to handle the differences between the SWT model and the GTK toolkit. -Jeff |