<Swing Dev> <AWT Dev> [PATCH] SwingUtilities2.isLocalDisplay()
Oleg Sukhodolsky
son.two at gmail.com
Sat Sep 6 04:07:15 UTC 2008
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.
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.
Regards, Oleg.
On Fri, Sep 5, 2008 at 10:55 PM, Roman Kennke <roman.kennke at aicas.com> wrote:
> Hi there,
>
> I've just synced up the Cacio forest with the JDK7 master forest, and
> I'd like to discuss and try to merge back (into JDK7) some of our
> patches. The following one affects all of AWT, Swing and J2D, this is
> why I'm posting it to 3 lists at once.
>
> In SwingUtilities2.isLocalDisplay(), we have some crazy platform
> specific code to find if we have a local display or not. This is of
> course not very nice for other Toolkit implementations than the Win32
> and X11 ones in OpenJDK. Our solution is to introduce an abstract method
> isLocalDisplay() in SunGraphicsEnvironment, which we call from
> SwingUtilities2. This method is then overridden by the specific GE
> implementations. If we don't have a SGE, we assume a local display.
>
> There are also some changes in the native font code, which used to call
> the static X11GraphicsEnvironment.isLocalDisplay(), to call the new
> instance method in SGE.
>
> What do you think? Is this reasonable to merge into mainline?
>
> /Roman
>
> --
> 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 swing-dev
mailing list