This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: GLightweightPeer,LightweightPeer,Toolkit allow creation and display of lightweight components


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]