This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: GLightweightPeer,LightweightPeer,Toolkit allow creation and display of lightweight components
- From: Tom Tromey <tromey at redhat dot com>
- To: "Scott Gilbertson" <scottg at mantatest dot com>
- Cc: <java-patches at gcc dot gnu dot org>
- Date: 15 Jan 2003 12:10:28 -0700
- Subject: Re: Patch: GLightweightPeer,LightweightPeer,Toolkit allow creation and display of lightweight components
- References: <066501c29a2a$14045f50$3c16a8c0@mantatest.com>
- Reply-to: tromey at redhat dot com
>>>>> "Scott" == Scott Gilbertson <scottg@mantatest.com> writes:
Scott> These changes allow creation and display of lighweight
Scott> components by directly subclassing java.awt.Component and
Scott> java.awt.Container.
I'm not so sure about this change. I'll look at it a little later
today and see what is going on.
Scott> gcc/libjava/java/awt/Toolkit.java
Scott> protected LightweightPeer
Scott> createComponent(Component target)
Scott> {
Scott> - return null;
Scott> + return gnu.java.awt.GLightweightPeer.INSTANCE;
Scott> }
This change we definitely can't put in. This makes the
platform-independent Toolkit class depend directly on a particular
lightweight peer implementation. It seems to me that this function
should be overridden in the platform-specific Toolkit, for instance
XToolkit. What do you think about that?
That said, I don't understand why the GLightweightPeer class is in
gnu.java.awt and not somewhere else. So, I'm a little confused.
Tom