[OpenJDK 2D-Dev] <AWT Dev> [PATCH] SwingUtilities2.isLocalDisplay()

Roman Kennke roman.kennke at aicas.com
Sat Sep 6 09:04:01 UTC 2008

Hi Oleg,

> I'm not the person who is supposed to review this changes from
> technical point of view,
> but I have one concern about idea of the fix.  It adds one more place
> where Swing uses sun-specific API.

No. It takes advantage of Sun internal API, but it does not depend on
it. (if (ge instanceof SunGraphicsEnvironment)  { doSomethingCool(); }
else { useReasonableDefault(); } ).

> Of course you can say that SwingUtilities2.isLocalDisplay() even
> before your fix uses code which is specific
> for Sun's implementation, and you will be right.  But this doesn't
> mean that we should leave with this.
> IMHO, if we change such code we should remove dependency between Swing
> and Sun-specific code,
> i.e. we should add public API.

I completely agree. That, of course, would be the best solution. But in
the past it has been communicated several times to me that I can't just
send in patches to public API and hope that it will be accepted easily.
I propose to get in this patch if possible first, then start a
discussion about adding public API.


Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-48
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt

More information about the 2d-dev mailing list