This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: AWT
Thomas Reilly wrote:
> I followed the link someone posted and found Sun's 3 reasons for using
> lightweights:
>
> 1.Native windows can be heavyweight, so it's undesirable to have too many of them.
>
> Doesn't see to be right. I use this plotting tool called xmgr that
> uses tons of Motif widgets and has never seemed sluggish. My
> impression with GTK+ apps is that they are even more snappy than Motif
> so I think we can safely say this point isn't valid.
Agreed. And, yes, most toolkits are snappier than Motif because they
weren't built on top of the X Toolkit.
> 2.Native windows are opaque, so they can't be used to implement transparent regions.
>
> This wouldn't seem to be super important. Does anybody know if GTK+
> has support for this? Doesn't the X11 Shape extension allow you to do
> all kinds of arbitrary clipping that could be used for transparency?
Yes and no. The shape extension gives you arbitrary-shaped windows that
can contain holes. X doesn't give you anything exactly like the glass
pane, a see-through window on which you can render.
> 3.Native windows are handled differently across platforms, so the AWT has to struggle to maintain a consistent view across these varied platforms.
>
> Herein probably lies the true answer, they had a hard time porting
> everything and keeping the Windows and X11 implementations consistent.
> GTK+ pretty much rules out this one too. And if platform consistency
> problems do crop up they can be fixed in GTK+.
I really wonder about this reason. It seems to me that raw native
windows instead of platform-specific GUIs could have enabled an awfully
good cross-platform toolkit without too many constraints (was the market
really screaming for the glass pane?). Instead, Sun opted for a
no-constraints design that rules out native-window implementation on any
platform.
Nathan
- Follow-Ups:
- Re: AWT
- From: Tom Tromey <tromey@cygnus.com>
- References:
- Re: AWT
- From: Jeff Sturm <jsturm@sigma6.com>
- Re: AWT
- From: "Thomas Reilly" <treilly@allaire.com>