United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6748082 remove platform-specific code from SwingUtilities2.isDisplayLocal
JDK-6748082 : remove platform-specific code from SwingUtilities2.isDisplayLocal

Details
Type:
Bug
Submit Date:
2008-09-12
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2009-01-09
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports

Sub Tasks

Description
rkennke: 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.

                                    

Comments
EVALUATION

rkennke:
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.
                                     
2008-09-12
SUGGESTED FIX

http://hg.openjdk.java.net/jdk7/jdk7/rev/b8f91ea2fb33, http://hg.openjdk.java.net/jdk7/2d/jdk/rev/b8f91ea2fb33
                                     
2008-09-12



Hardware and Software, Engineered to Work Together