[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: KDE and GNOME interfaces
|
If you haven't read the SWT architecture papers at www.eclipse.org, you
may be interested in them.
The basic idea of SWT is to write Java implementations of each widget
using native lib calls. These basically replace the native peers that
AWT uses.
(In AWT, native code ("peer") calls the native libs to realize widgets.
In SWT, Java code (kinda like the "peer") calls the native libs to
realize widgets.)
This means that on each platform, you'll see Java "wrappers" to the
native API implementation.
If you use these directly, you're coding to that specific platform. If
you use the SWT widgets, you're coding platform independent (which is
really the intent).
Personally I think this is really the right way to do native widgets
with Java. Makes debugging a lot easier, and if you really want to do
native lib stuff, you can pretty easily...
As for porting, I think it should be about as easy to port as AWT
(instead of creating native peers, you create Java "peers")
(Anyone: If I misunderstood something here, please poke me with a sharp
stick to wake me up...)
-- Scott
==============================================================
Scott Stanchfield FGM, Inc. thetick@xxxxxxx
Home Page: http://javadude.com thetick@xxxxxxxxxxxx
Lead author of "Effective VisualAge for Java, Version 3"
http://javadude.com/evaj
VisualAge for Java Tips and Tricks http://javadude.com/vaj
AWT & Swing FAQ Manager, jGuru.com
Visit for Java Enlightenment! http://www.jguru.com
==============================================================
"David Goodenough" <david.goodenough@xxxxxxxxxxxxx> wrote in message
news:9lg7p2$968$1@xxxxxxxxxxxxxxxx
> I notice that Eclipse provides its own Java API to KDE (and I think
> GNOME). Why? In the kdebindings project of KDE there is a fully
> functional KDE Java Binding, shipping as a full part of the now
> current KDE 2.2. It also BTW provides a binding to QT which would
> provide a much fuller interface than the current Motif interface.
>
> Using this API would allow integration with more than just things
> like MIME types. It would also allow integration with the KParts
> and DCOP systems, which would allow the integration of things like
> Konqueror as the Help browser and the use of DCOP where you use COM
> on a Windows system which would achieve a similar binding to the
> platform as you have with Windows.
>
> Now I do not know what the Java API into GNOME looks like but I did
> notice just yesterday that there is a new release of the API on
> linuxapps.com.
>
> I know that not everyone runs KDE (or GNOME for that matter), but it
> would certainly be preferable to use the APIs they provide for the
> bits you need than to invent your own.