Patch: Xlib AWT and Java 2D

Jeff Sturm jeff.sturm@appnet.com
Mon Oct 23 10:10:00 GMT 2000


Bryce McKinlay wrote:
> I'd like to make LightweightDispatcher pkgprivate and move it into java.awt
> (actually, might as well put it into Container.java - Sun have it there
> according to my stack trace). This way it can be made more efficient by
> referring to component bounds and such directly rather than by calling
> getX()/getY()/etc. I think it is generally safe and desirable to bypass the
> get methods within the awt implementation itself. LightweightPeer should
> probably go in there too for the sake of continuity.

Breaking encapsulation that way should not be necessary in general... the
compiler can inline the necessary calls.  Unfortunately in this case
getX/getY/etc. are not declared final (as they ought to be if the member
variables are not private and thus probably cannot be overridden in a useful
way).

--
Jeff Sturm
jeff.sturm@commerceone.com


More information about the Java-patches mailing list