[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-swt-dev] SWTToolkit as AWT Peers
|
Cool
-- thanks for the input.
You're
right on what I meant by running apps (starting them from within eclipse, to
test, debug, whatever)
Anyone
happen to know what the deal with the sun.awt classes is? In JDK 1.1, the AWT
components just used peers. In JDK 1.2 and beyond, they call all sorts of
sun.awt classes. The biggest annoyance is that the SWTToolkit has to extend
sun.awt.SunToolkit, unless I want to totally reimplement many of the AWT
components themselves (which becomes a licensing issue).
Looks
like some of the stuff in there may be helpful, but I'm a little
nervous...
This
project gets bigger by the minute...
Thanks!
-- Scott
If you're looking for ways to make AWT based visual plugins for
Eclipse, the best thing to have would be an AWT implemented, as yours is, on
top of SWT widgets. There certainly *could* still be problems with multiple
distinct AWT-on-SWT implementations, but it seems like they should be fairly
minor if all were following the dictates of the SWT layer. Any one such,
should be much better integrated than one based on understanding the internals
of the way SWT and AWT (separately) deal with the o/s (as the
org.eclipse.swt.internal.awt.win32.SWT_AWT hack is).
So, to this extent, "dictating an AWT peer
implementation" is not as important as "constraining it to be an AWT with SWT
peers implementation".
Having said
that, I think if you were to provide one which worked well and played nice
with the rest of the u/i, there wouldn't be much pressure to have
another.
I'm not sure what you're
asking in the last part of your question, but if you mean "applications run
from within Eclipse", then yes there would be no constraints on what toolkit
was used by them. They do indeed run in their own VMs.
McQ.
| "Scott Stanchfield"
<scott@xxxxxxxxxxxx> Sent by: platform-swt-dev-admin@xxxxxxxxxxx
11/23/2001 11:50 AM Please respond to platform-swt-dev
| To:
<platform-swt-dev@xxxxxxxxxxx> cc:
Subject: [platform-swt-dev]
SWTToolkit as AWT Peers |
As some of you may know, I've been working on a set
of AWT peers that use
SWT as the "native widgets". This has been going well
so far, but I've hit a
point that I think needs to be discussed.
How
exactly can we use this for plugins in Eclipse?
To use alternate AWT
toolkits, you specify the awt.toolkit system property
when a VM starts or
using System.setProperty().
It appears (from some testing) that once AWT
has loaded its toolkit, you
can't change it by setting the awt.toolkit
property again in a program.
I think this would mean that the first plugin
that uses AWT, we're stuck
with what it used for the AWT toolkit (whether
it's the default toolkit or
one it specified).
So, for plugins to
work properly and consistently, we'd have to set the AWT
toolkit to use at
eclipse startup.
The question is, are we willing to "dictate" an AWT
peer implementation for
plugins?
It seems like the "right" thing to
do, treating "Eclipse" as the platform.
Applications are run in their
own VM, right? Assuming so (which I'm nearly
100% sure of), this choice
would not affect them. Apps could use the default
toolkit or whatever they
want...
--
Scott
==============================================================
Scott
Stanchfield scott@xxxxxxxxxxxx
http://javadude.com
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
==============================================================
_______________________________________________
platform-swt-dev
mailing
list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev