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

Dmitri Trembovetski Dmitri.Trembovetski at Sun.COM
Fri Sep 5 20:25:25 UTC 2008

   Hi Roman,

   the patch looks reasonable to me.


Roman Kennke 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

More information about the 2d-dev mailing list